Hello,
I have a stereotyped class that I need to display as a Use Case (ellipse) based on a tagged value.
I can't get the element name to be printed in the middle.
I ran a test without the Tagged value condition which works:
shape main{
h_align = "center";
v_align = "center";
ellipse (0, 0, 100, 100);
print("#name#");
}
With the following ShapeScript, I'm getting the following error: Unexpected symbol h_align
shape main{
if (HasTag('UC','true'))
{
h_align = "center";
v_align = "center";
ellipse (0, 0, 100, 100);
print("#name#");
}
else
{
DrawNativeShape();
}
}
I also tried the following but the label is still rendered in the top left corner.
shape main{
if (HasTag('UC','true'))
{
ellipse (0, 0, 100, 100);
addsubshape("uclabel");
shape uclabel{
setorigin("CENTER",0,0);
print("#name#");
}
}
else
{
DrawNativeShape();
}
}