Sparx Systems Forum
Enterprise Architect => General Board => Topic started by: rty on November 19, 2020, 03:20:48 am
-
In a diagram, I want to not show the stereotype label of elements which are of a certain stereotype (because I need to modify the element's layout using shape script which I can only achieve for stereotyped elements).
According to the manual https://sparxsystems.com/enterprise_architect_user_guide/15.2/modeling/drawing_methods.html (https://sparxsystems.com/enterprise_architect_user_guide/15.2/modeling/drawing_methods.html),
shape middlebottomlabel { print(""); }
should "suppress the default stereotype label", but it doesn't. Even if I use the middletoplabel. Or any other label. Even
hidelabel("middletoplabel")
or middlebottomlabel doesn't hide thelabel.
To hide all stereotype label as suggested at StackOverflow https://stackoverflow.com/questions/54693762/how-to-hide-stereotypes-labels-from-my-profile (https://stackoverflow.com/questions/54693762/how-to-hide-stereotypes-labels-from-my-profile) is not an option for me, since some elements need a visible stereotype.
What do I miss? Any hint?
-
That's only meant for connectors. For elements you need to draw the shape yourself and print just the element name. For actiions that will loose the ability to print the name in bold.
q.
-
The middlebottomlabel thing is only for relations.
You might need to rewrite the whole shape (without the stereotype) to pull that off, I'm not sure.
Geert
-
I think (I haven't tried it) the following might work for diagram objects:
shape label
{
print("");
}
but it's of no help to you in hiding the stereotype from a Component because the stereotype isn't shown in a label. The Show Stereotypes option affects all elements on a diagram, so you will have to either use that or take control of drawing the whole Component shape.
-
shape label
{
print("");
}
A pity, but doesn't work for me.
-
As said you need to take care of the whole rendering in your case. Start with a
shape main {
Rectangle(0,0,100,100);
print("#name#");
}
and then go on bit by bit...
q.
-
Ok, thanks. This works but is a ... rather inconvenient approach. ;)
-
Not invonvient but Sparxian :-/
q.