Author Topic: Enum attributes are not shown in own shape script  (Read 2390 times)

Boron

  • EA User
  • **
  • Posts: 111
  • Karma: +6/-0
    • View Profile
Enum attributes are not shown in own shape script
« 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?
Code: [Select]
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#");
}
}

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13404
  • Karma: +567/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Enum attributes are not shown in own shape script
« Reply #1 on: January 24, 2019, 12:00:43 am »
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