Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: sandeep bhat on November 15, 2014, 01:01:15 am
-
Hi,
There is this method from the Repository Class GetElementsByQuery (string QueryName, string SearchTerm).
i want to find an Element object with its name 'sint16'.
By default this query- GetElementsByQuery ("Simple", "sint16") returns a collection witth the string sint16 contained in either name or notes. I want to filter this query only if it matches the name.
-
You could write your own SQL search:
SELECT t_object.ea_guid AS CLASSGUID, t_object.Object_Type AS CLASSTYPE,t_object.Name FROM t_object WHERE Name = "<Search Term>"
q.
-
Thanks q, by the way is the Enterprise Architect Database accessible? Any location where it is saved?
-
Yes. Use Repository.SQLQuery("SELECT...") (see the help). You might also be interested in my Inside book (link below).
q.
-
Yes, i will definitely have a look at it. Thanks again q.