Book a Demo

Author Topic: Processing connectors in addin  (Read 3225 times)

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Processing connectors in addin
« 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

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: Processing connectors in addin
« Reply #1 on: June 12, 2020, 08:13:10 pm »
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

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Re: Processing connectors in addin
« Reply #2 on: June 12, 2020, 08:15:42 pm »
Thanks
I have no experience of using sql queries so will have to go learn

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller

GrahamL

  • EA User
  • **
  • Posts: 111
  • Karma: +2/-0
    • View Profile
Re: Processing connectors in addin
« Reply #4 on: June 12, 2020, 08:46:23 pm »
Cheers