Book a Demo

Author Topic: Get all elements at the other end of DiagramGate  (Read 2912 times)

ankur

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Get all elements at the other end of DiagramGate
« on: May 08, 2019, 06:44:39 pm »
Hello,

I am trying to extract all the elements connected to the other end of the DiagramGate in Sequence Diagram using EA API in C#.

Till now, I am calling out all connectors from a diagram and extracting the "Supplier" from the Connector where the "Client" type is MessageEndpoint. Something like this:

Code: [Select]
foreach (Connector singleConnector in singleDiagram.Connectors )
{
    if (Repository.GetElementByID(singleConnector.ClientID).Type.Equals("MessageEndpoint"))
    {
        Element theElement = Repository.GetElementByID(singleConnector.SupplierID);
    }
}

But I want to read all the elements connected to the given DiagramGate (independent of diagrams) using EA API.

I can see the Relationships when I right click the DigramGate and then go to Properties -> Special Actions -> Related -> Links.

Is there a possibility to extract the "Relationships" using EA API ?

Thanks in advance.

Regards,
Ankur
« Last Edit: May 08, 2019, 07:01:48 pm by ankur »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +397/-301
  • I'm no guru at all
    • View Profile
Re: Get all elements at the other end of DiagramGate
« Reply #1 on: May 08, 2019, 07:11:09 pm »
I guess the easiest is to run a custom SQLQuery for that.

q.