Book a Demo

Author Topic: Name of the action not always at the same place  (Read 5036 times)

RealPecho

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Name of the action not always at the same place
« on: March 14, 2023, 03:24:31 am »
why the name of the action is in the middle of the element and not in the top?
I use the same stereotype twice, but the position of the name is ddifferent. how can I control this?



Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Name of the action not always at the same place
« Reply #1 on: March 14, 2023, 04:47:01 am »
Depends on the shapescript I guess.

Geert

RealPecho

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Name of the action not always at the same place
« Reply #2 on: March 14, 2023, 09:49:55 pm »
I though also this point, but both element have the same stereotype -> same shape script

do you know how to control this in the shape script?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Name of the action not always at the same place
« Reply #3 on: March 14, 2023, 11:04:55 pm »
Probably it's inside a profile. You need to ask the profile's creator. (There is a way to hack the script in the MDG file, but ...)

q.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Name of the action not always at the same place
« Reply #4 on: March 14, 2023, 11:05:03 pm »
Yes, but both don't seem to have the same tagged values (or where the values PhaseCurrent,SensorElectricalPower:,...) are coming from.

Quite possible the shapescript does something different when these are present or not.
Or the mere fact that these parts are missing could mean taht the name parts has more space, adn thus prints the name lower.
Hard to tell without the shapescript.

Geert

RealPecho

  • EA User
  • **
  • Posts: 21
  • Karma: +0/-0
    • View Profile
Re: Name of the action not always at the same place
« Reply #5 on: March 14, 2023, 11:51:07 pm »
ok. I add an element (Action Call Behaviout) from the SysML Toolbox and the name was on the top, then I change the stereotype of the element and the name go to the middle. Here is the Shape Script (I put some ... to make shorteer the text:

Code: [Select]
shape main
{
noshadow = "true";
if (HasTag("ElementType","Mechanical"))
{
setfillcolor(210,108,30);
}
...
else if (HasTag("ElementType","Mechatronical"))
{
setfillcolor(255,228,188);
}
DrawNativeShape();
}

decoration Type
{
orientation = "SW";
if (HasTag("showElementType","true"))
{
if (HasTag("isSignal","true"))
{
println("Sig");
}
...
else if (HasTag("ElementType","Mechatronical"))
{
println("Mea");
}
}
}

decoration SIL
{
orientation = "NW";
if (HasTag("showSafetyIntegrity","true"))
{
if (HasTag("SafetyIntegrity","None"))
{
// hide label
HideLabel("");
}
else
{
// Not applicable
if (HasTag("SafetyIntegrity","Not applicable"))
{
setfillcolor(255, 255, 255);
print("Na");
RoundRect(0,0,100,100,4,4);
}
....
}
}
}

shape RelatedElement
{
if(HasProperty("Connector.Type", "Realisation"))
{
if(HasProperty("Element.IsTarget"))
{
SetCompartmentName("ExternalRequirements");
AppendCompartmentText("Req #Element.Name#");
}
}
if(HasProperty("Connector.Type", "Dependency"))
{
if(HasProperty("Element.IsSource"))
{
SetCompartmentName("DerivedRequirements");
AppendCompartmentText("Req #Element.Name#");
}
}
if(HasProperty("Connector.Type", "Abstraction"))
{
if(HasProperty("Element.IsTarget"))
{
SetCompartmentName("AllocatedTo");
AppendCompartmentText("#Element.Name#");
}
}
}

I don't have any control for the text

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Name of the action not always at the same place
« Reply #6 on: March 15, 2023, 01:06:41 am »
So where's the part about the things like "PhaseCurrent"?

Are those tagged values? How are they printed? Why do they print on one object, and not the other?

Geert

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: Name of the action not always at the same place
« Reply #7 on: March 15, 2023, 08:25:17 am »
So where's the part about the things like "PhaseCurrent"?

Are those tagged values? How are they printed? Why do they print on one object, and not the other?
I'd say they are the names of the Pins they are next to.

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Name of the action not always at the same place
« Reply #8 on: March 15, 2023, 08:41:07 am »
So where's the part about the things like "PhaseCurrent"?

Are those tagged values? How are they printed? Why do they print on one object, and not the other?
I'd say they are the names of the Pins they are next to.
Indeed, I didn't notice the pins there.

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Name of the action not always at the same place
« Reply #9 on: March 15, 2023, 10:01:12 pm »
Hidelabel need a value, not an empty string.

q.