Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: bITs.EA on January 19, 2017, 02:38:28 am
-
Hi
I have a simple shapescript for a stereotype with metaclass "ObjectNode":
shape main
{
noshadow="true";
fixedAspectRatio="true";
SetFillColor(255,255,255);
defsize(20,20);
startpath();
moveto(50,0);
lineto(75,50);
lineto(50,100);
lineto(25,50);
lineto(50,0);
endpath();
//StrokePath();
FillAndStrokePath();
}
When I use this element, the shape is drawn as expected. BUT the name of the element is shown below the shape. How can I 'hide' the name?
-
ObjectNode may use the Label subshape to render the name. You can check by seeing if you can select the "label" and move it around.
Try:
Shape Label
{
print ("");
}
to override the default Label Behaviour.
-
Thanks Paolo! That's the solution indeed.
I just found the same answer in the MDG documentation :)
If you have an empty shape routine, it overrides the default; so, a blank 'shape label' prevents the creation of the
normal floating text label for elements that have them
My solution (same idea as Paolo's)
shape main {
// main code
}
shape label {
//empty label shape to prevent the name from showing on the diagram
}