Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: furman76 on September 30, 2011, 10:18:04 pm
-
Hi,
Attribute attr = parent.GetAttributes().AddNew(name, type);
attr.SetStereotype("My Attribute");
attr.Update();
works, and "My Attribute" is displayed on the class, but it is not linked in any way to the "My Attribute" stereotype defined in my UML Profile. I still have to manually update stereotype for every attribute imported. Is there any way to set specific stereotype through the API? Also, is there a way to invoke tagged value synchronization for the stereotypes defined in the UML profile?
-
Not sure if this works at all: try to qualify the stereotype with your MDG (like MYMDG::My Stereotype).
q.
-
Tried it. Also tried to specify stereotype GUID instead of name. It just treats it as string. Looks like a gap.
-
While working on my new ebook I once again stumbled over this. According to this thread (http://www.sparxsystems.com/cgi-bin/yabb/YaBB.cgi?num=1308572379/0#0) the creation does work. I tried this with my own profile but failed. Probably there's a bug in EA. I'll investigate a bit more.
q.