Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Daiim on June 12, 2025, 10:05:10 pm

Title: Get/check all stereotypes via SQL Query?
Post by: Daiim on June 12, 2025, 10:05:10 pm
Hi all,

using the EA API there is an attribute called StereotypeEx that includes all Stereotypes of a given EA.Element as a comma separated list in a string.
I need to check for a certain Stereotype via SQL Query but the t_object obj.Stereotype only returns the first being set in model. How can I fetch (or better check) the other ones via SQL?

Thank you very much for any hint!

Best regards,
Daiim
Title: Re: Get/check all stereotypes via SQL Query?
Post by: Geert Bellekens on June 12, 2025, 10:25:26 pm
Hi all,

using the EA API there is an attribute called StereotypeEx that includes all Stereotypes of a given EA.Element as a comma separated list in a string.
I need to check for a certain Stereotype via SQL Query but the t_object obj.Stereotype only returns the first being set in model. How can I fetch (or better check) the other ones via SQL?

Thank you very much for any hint!

Best regards,
Daiim
Full stereotype info is stored in t_xref

Geert
Title: Re: Get/check all stereotypes via SQL Query?
Post by: Daiim on June 13, 2025, 08:59:39 pm
Geert, thank you! Works great, even if it adds some complexity.

Best regards,
Daniel