Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: Arnoud_B on September 14, 2021, 06:51:01 am
-
A Diagram object has a SelectedObjects function returning all the DiagramObjects that are currently selected.
However it does not have a SelectedLinks function returning all DiagramLink objects that are currently selected.
Instead it has a SelectedConnector function returning the Connector wrapped in the selected DiagramLink object. It only returns one while you can select multiple diagram links but then SelectedConnector returns null.
So my script only works when you select one connector at a time ...
-
Connectors are 2nd class citizens. You can select only one at a time. Try otherwise in the GUI.
q.
-
Well shift click does not work but if you drag a selection square over a part of your drawing you can very well select multiple Connectors. Maybe in SparxEA they are treated as second rate but the data model is rather clear on the relationships but the operations on the class do not follow it correctly. Well probably a legacy issue of something that worked different before and needed to be kept backwards compatible.
-
if you drag a selection square over a part of your drawing you can very well select multiple Connectors
I've never seen that behavior. As far as I'm aware the select area function only selects objects.
-
Well visually the connector end points get highlighted so from that I assumed that the connectors were selected as well.
But assumptions are the cause of all errors so apparently why I assumed is not correct.
It would have been nice though ...
-
No, they don't. A selected connector shows the litte squares at their ends. But the drag only selects the elements. The connectors don't show that. Try dragging one of the "selected" connectors. Won't work.
q.