Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Robert Sheridan on December 03, 2016, 02:32:09 am
-
Hello all,
I am wanting to use the API to extract the profile used to set the stereotype for an element. I can get the stereotype but have not found anything in the API that gives me the profile, does anyone know how to do this.
Thanks
-
AFAIK there is nothing in the API to give you that information. What you need to do is to query t_xref:
SELECT description FROM t_xref WHERE client=<ea_guid of element>That will return something like @STEREO;Name=ArchiMate_Junction;FQName=Archimate2::ArchiMate_Junction;@ENDSTEREO;
Use Repository.SQLQuery and parse the returned XML string.
q.
-
Thanks Qwerty, have been reading your book and that was where it was leading me.
Free uptick: the books have been very useful, very good investment.
-
Element.FQStereotype (http://sparxsystems.com/enterprise_architect_user_guide/13.0/automation/element2.html)
-
Doh! I just testet StereotypeEx :-[
q.
-
Thanks Simon, did not spot that this had been added in to the API since I last did this (reusing old code).
Robert