Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Hoefler1 on March 17, 2016, 08:00:08 pm

Title: Diagram.SelectedConnector, unselect the connector on a Diagram ??
Post by: Hoefler1 on March 17, 2016, 08:00:08 pm
One simple task:
The Add-In has to unselect the currently selected Connector on a Diagram (if there is one selected).
It can be accessed by Diagram.SelectedConnector
The attribute is Read/Write, so I wanted to set it to null, which leads to this error: Invalid interface passed to 'SetSelectedConnector'.

Any ideas?
Title: Re: Diagram.SelectedConnector, unselect the connector on a Diagram ??
Post by: qwerty on March 17, 2016, 08:05:51 pm
I guess you should report this as bug. Probably you can mimic it meanwhile by saving the SelectedObjects, reloading the diagram and re-selecting the objects :-/

q.
Title: Re: Diagram.SelectedConnector, unselect the connector on a Diagram ??
Post by: Hoefler1 on March 17, 2016, 08:26:19 pm
Thank you!  :D
Works fine now. And I just had to add one simple line (Repository.ReloadDiagram(Diagram.DiagramID);)
Hadn't thought of that simple solution.
I'll still send a bug report for the SelectedConnector.