Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: themiyac on August 06, 2015, 02:37:22 am
-
We have defined a profile and it has sterotypes in it. We imported the profile into the model and we are using your java api to apply a stereotype. The apply stereotype method only takes a string. If another profile has a stereotype with the same name that we applied then there is a chance that your apply stereotype method applies another stereotype than the one that we want to apply. How do I destinguish that the GetStereotype method and ApplyStereotype method is coming from our profile when all they return is just the name of the stereotype?
-
Good question. I'd assume that the names need to unique but would not know where this constraint is stated (too lazy to crawl through Superstructures). Sparx?
q.
-
I think fully qualified name is a solution, because it provides the name in terms of Profile::Stereotype::Tag, but would still like to have an official answer from Sparx.
-
When you apply your stereotype, give it a fully-qualified name, e.g. "MyProfile::MyStereotype". To find out the fully-qualified stereotype that has been applied to an element, for now you will need to look in t_xref, but hopefully it should appear in the Automation Interface in a future release.
[edit]select Description from t_xref where Name='Stereotypes' and Client=<GUID>, replacing <GUID> as appropriate[/edit]