Here's from the User Guide what confuses me:
Shape Scripts operate on the basis that the default (UML) representation is used unless the script contains an alternative definition.
[...]
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
For my MDG, I'd like to override only the border color of a stereotyped "Component" based on some tagged value:
shape main{
v_align="center";
h_align="center";
// Check the tagged value "TV1" and set border colour accordingly
if (hastag("TV1", "Red Type"))
{
setpencolor(255, 0, 0);
}
if (hastag("TV1", "Green Type"))
{
setpencolor(0, 255, 0);
}
if (hastag("TV1", "Blue Type"))
{
setpencolor(0, 0, 255);
}
}
With this, any element of that stereotype I add to a diagram is there, but "invisible", so I see no border, no filling, no text, etc.
Is this because my existing "shape main" is actually interpreted as "empty" and thus overriding EVERYTHING, so only the pen color applies (which, of course, has no effect without any drawing specified)?
Do I really have to add the other definitions manually, or is there a way to keep the shape's default?
BR,
EAabecedarian