Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: peter.zrnko on May 05, 2008, 08:10:24 pm
-
What's the best way to get an element (class) by it's name using automation interface?
I've found this
For example GetElementsByQuery('Simple','Class1'), where results contain elements with Class1 in the Name and Notes fields.
in the help.
Isn't it possible to use collection of elements and getByName()? But I didn't found any collection of all elements in a Repository (Project).
-
I would use sql directly on the database.
SELECT Object_ID FROM t_object WHERE Name = 'elementName'
When I just want to find objects I almost always use sql. The ability to write more advanced queries with sql saves me a lot of execution time. But I try to use the automation interface when setting values.
/N