Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Mario on February 02, 2005, 03:43:07 am
-
Hi, is there a way to
* select an element in the tree view of the project view
and
* to open its property dialog
from within an Add-in. There seems to be no method like "SelectElement(int ElementID)" and "ShowPropDlgElement(int ElementID)" in EA's automation interfaces.
Thank you for all replies,
Mario
-
To get the item currently selected in the tree, try this:
ObjectType = Repository.GetTreeSelectedItem(Object)
Pass in a generic object type and then type cast it to something more specific after seeing what ObjectType is. If you already know what the element ID is then:
Element = Repository.GetElementByID(ID)
should do it. More details in the help file - a search for "GetTreeSelectedItem" should get you to the right page.
The properties dialog (or any other EA dialog for that matter) isn't available from the Automation Interface.
-
Thanks you for the suggestion,
but i have to bring an already known element (choosen by user from a list of relevant elements in a custom view) into users sight. This could be done by selecting this element in the project tree.
Unfortunately there seems to be no way of influencing the user interface behavior of EA.
Regards,
Mario