Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: ahafez on August 01, 2016, 09:27:58 pm

Title: Search mechanism
Post by: ahafez on August 01, 2016, 09:27:58 pm
Hi,

Is there is an EA API could be used in a script for searching?

I am looking for an API that its inputs the type of the search element and part of its name, and the output is a list of matching elements like the GUI search using the (Crt+f).

What I don't like by go though all the element from the root and check its type and name but if so is there is an example of that way?

Thanks,
---
Ahmed
Title: Re: Search mechanism
Post by: qwerty on August 01, 2016, 09:52:04 pm
Actually you can do that completely without scripting by using the embedded SQL search. Ctrl-F, click the "new search" icon top right (right of the green triangle), name it and choose SQL Editor. Here you can create any kind of search.

q.
Title: Re: Search mechanism
Post by: ahafez on August 01, 2016, 11:37:13 pm
Hi qwerty,

Thanks you for your reply.

I found the GetElementsByQuery() API and it works well with me.