Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: GrahamL on June 12, 2020, 08:02:59 pm
-
Hi
Suppose I have 2 elements linked via a connector.
In my addin I am looping through the elements in a package and within the loop I am looping through the connectors
Obviously each element has a connector (the same one).
During my processing of the connector I want to able to identify which is the source and which is the destination but cant see how to do this?
Any hints
Thanks
-
You have to compare the SupplierID and ClientID with the ElementID of your element.
Geert
PS. This is a potentially very slow way to get to your connectors. You can also get the connectorID's you need using Repository.SQLQuery and then get the connectors using Repository.GetConnectorByID
-
Thanks
I have no experience of using sql queries so will have to go learn
-
You can find a lot of example in C# https://github.com/GeertBellekens/Enterprise-Architect-Add-in-Framework (https://github.com/GeertBellekens/Enterprise-Architect-Add-in-Framework) or vbscript https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library (https://github.com/GeertBellekens/Enterprise-Architect-VBScript-Library)
Geert
-
Cheers