Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Boron on January 23, 2019, 11:30:45 pm
-
Hello,
when creating an enumeration element including some attributes, the attributes are displayed by default in a diagram.
In an MDG I have different stereotyped enumerations, and I would like to have own shape scripts for them.
But with the below shown code the shape script does not show the attributes.
What am I missing?shape main
{
// initialisation
layoutType = "border";
rectangle(0,0,100,100);
addsubshape("namecompartment","N");
shape namecompartment
{
preferredHeight = "20";
h_align = "center";
rectangle(0,0,100,100);
print("#stereotype#: #name#");
}
}
-
You didn't specify anything about the attributes, so that is why there are not there.
Unfortunately there is no way to replicate the attributes compartment with shapescript.
The best you can do is draw the one from the parent shape using DrawParentShape();
Geert