Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: falwick on June 15, 2012, 04:13:52 pm
-
Greetings
When I use Quick Link and define EA.Connection witch EA.Element
EA send me events in this order
EA_OnPreNewElement
EA_OnPostNewElement
EA_OnPreNewConnector
EA_OnPostNewConnector
In OnPostNewElement I wish to obtain information whether new Element was created using QuickLink in context element (ElementID) or information that Element was created by dragging from Toolbox
I try use event EA_OnContextItemChanged or GetContextObject () method for Repository class but it returns me only current selected object so when I select some element from Toolbox and drag it I get the previously selected object as context object, and not the proper context object or NULL, whichever is true.
Reproduced Situation
First Situation
On Use Case Diagram
1)Make Actor
2)From Actor with Quick Link select UseCase ->Use
In Event EA_OnPostNewElement method GetContextObject() returns Actor
Second Situation
1)Make Actor select this Actor
2)From toolbox drag UseCase
In Event EA_OnPostNewElement method GetContextObject() return Actor // but it's wrong, context should be null or something that was created from toolbox
Thanks for help