Author Topic: Changing Context Yourself ?  (Read 684 times)

Ceronimo

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Changing Context Yourself ?
« 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.


Geert Bellekens

  • EA Guru
  • *****
  • Posts: 7740
  • Karma: +165/-21
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Changing Context Yourself ?
« Reply #1 on: April 27, 2016, 01:47:13 am »
No, I'm afraid not

Geert

Simon M

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 6197
  • Karma: +47/-5
    • View Profile
Re: Changing Context Yourself ?
« Reply #2 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.
Simon

support@sparxsystems.com

Ceronimo

  • EA User
  • **
  • Posts: 45
  • Karma: +0/-0
    • View Profile
Re: Changing Context Yourself ?
« Reply #3 on: April 27, 2016, 04:26:00 pm »
thanks, i will try some workearounds