Sparx Systems Forum
Enterprise Architect => Automation Interface, Add-Ins and Tools => Topic started by: chrislro on April 06, 2022, 07:48:46 pm
-
I have a component in my model with connections to "a parent and childrens" (e.g. Composition to Whole, Realization). In the UI the EA Traceability Windows shows
ComponentInTheMiddle
- part of ComponentParent
- composed of ClassChild1, ClassChild2, ...
I have a script that scans the connections of the "ComponentInTheMiddle", but I do not know how the "part of" is represented in EA scripting. Is there somewhere a (complete) map, how the displayed connections in the UI are mapped in the scripting Connector Package?
-
You can look at the stereotype and the connector type. Those can as well be found in the properties.
q.
-
Hm,
I just recognized that EA scripting interface "element.connectors" for the ComponentInTheMiddle returns me only the connectors to the "downwards" elements e.g. "composed of ClassChild1", but not the "upwards" ones like "part of ComponentParent". How can I get the parent element?
Edit: I think I still do not fully understand the scripting ... I think I mixed up the connection start (ClientID) and end points (SupplierID) ... will work on that - nevertheless any help is appreciated.
-
The connector has clientId and supplierId. Both can be used to get the connected element via repository.GetElementByID.
q.