Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Ceronimo on April 27, 2016, 12:15:56 am

Title: Changing Context Yourself ?
Post by: Ceronimo on April 27, 2016, 12:15:56 am
I am Creating new Elements from a Library,
but my Problem is that the Context (selected) Item doesn`t Change.

f.e if i create Attribute ea automaticly changes the context to the new Attribute.

but this doesnt work with Operations and with Elements(Class Component etc).

is there any possibility to set the Context by the id or gui id ?

In my case i have to Trigger the on contextitemchanged Event with the new created Element.

Title: Re: Changing Context Yourself ?
Post by: Geert Bellekens on April 27, 2016, 01:47:13 am
No, I'm afraid not

Geert
Title: Re: Changing Context Yourself ?
Post by: Eve on April 27, 2016, 08:23:34 am
If you're adding it to a diagram I would expect changing the Diagram.SelectedObjects collection would do it. Can't remember if you can set selection in the project browser via the API.
Title: Re: Changing Context Yourself ?
Post by: Ceronimo on April 27, 2016, 04:26:00 pm
thanks, i will try some workearounds