Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Pegasus on January 04, 2017, 11:23:09 pm
-
Hello,
there are some contratictory topics to question how to get in projectbrowser selected Obejcts (e.g. packages, requirements/elements); e.g. http://sparxsystems.com/forums/smf/index.php/topic,30519.msg222208.html#msg222208 [Geerd] and http://sparxsystems.com/forums/smf/index.php/topic,5050.msg123251.html#msg123251 [Aaron]. I do have same problem. In EA 13 using Java API GetTreeSelectedElements returns collection with e.g requirements only not also selected packages, so I assume there isn't an interface returning collection of selected "objects" [in project-browser]. But how is it possible to recognise multiple selections of "objects" e.g. packages and elements at once
Thanks for support and elucidation
Pegasus
-
I just checked in v13 and GetTreeSelectedElements returns nothing when only packages are selected.
There also doesn't seem to be a way to select both packages and elements, it's one or the other.
To my knowledge there's no way to get the selected packages.
Geert
-
You could trick with a UML search that includes the #Branch# tag. However, this is just bad API design here.
q.