Author Topic: Map between EA UI "Traceability" notation to scripting interface (e.g."part of")  (Read 2269 times)

chrislro

  • EA User
  • **
  • Posts: 30
  • Karma: +2/-0
    • View Profile
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?

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
You can look at the stereotype and the connector type. Those can as well be found in the properties.

q.

chrislro

  • EA User
  • **
  • Posts: 30
  • Karma: +2/-0
    • View Profile
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.
« Last Edit: April 06, 2022, 10:32:49 pm by chrislro »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
The connector has clientId and supplierId.  Both can be used to get the connected element via repository.GetElementByID.

q.