Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: adepreter on May 23, 2024, 07:37:11 pm

Title: Setting the context object to a specific connector
Post by: adepreter on May 23, 2024, 07:37:11 pm
Is there a way to set the ContextObject to a specific connector in the currently active diagram.
So that Repository.GetContextObject() can then return the connector.

I tried activeDiagram.SelectedConnector = connector;
This selects the connector in the UI. But Repository.GetContextObject() does not return the connector.
Title: Re: Setting the context object to a specific connector
Post by: qwerty on May 23, 2024, 09:35:59 pm
Connectors are 2nd class citizens. So with current tools you can't access them. Just you could select two connected elements and find out their connection(s). Otherwise you need the EA property windows for manual pointing.

q.
Title: Re: Setting the context object to a specific connector
Post by: adepreter on May 24, 2024, 03:00:55 am
Thank you