Sparx Systems Forum

Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: niko_ea on June 15, 2024, 06:02:34 am

Title: How to Retrieve All Connectors of a DiagramObject
Post by: niko_ea on June 15, 2024, 06:02:34 am
Hello,

I found out that in the ConnectorClass, one can get the target and the source element of the relationship. Now, I am trying to find a way to get all connectors that are connected to a DiagramObject, but I couldn't find anything.

I just wanted to ask if I missed something or if it is impossible to retrieve this information from the API? If it is impossible, I will just store all connectors for each DiagramObject with the information that is available from the API.

I would greatly appreciate any help or guidance you can provide.

Best regards,
Niko
Title: Re: How to Retrieve All Connectors of a DiagramObject
Post by: qwerty on June 15, 2024, 06:46:48 am
Get the element's object-id and issue a query on t_connector where either start_object_id or end_object_id match. Then you have the conterpart on the corresponding end/start_object_id.

q.
Title: Re: How to Retrieve All Connectors of a DiagramObject
Post by: niko_ea on June 15, 2024, 07:26:26 am
Perfect, thank you for the answer! This solves my issue.