Book a Demo

Author Topic: Get the diagram details of an element  (Read 4216 times)

sspvirgo

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Get the diagram details of an element
« on: August 13, 2011, 03:14:09 am »
Hi,

Is there a way to find the diagram details like its id, description if we have the element details.

For eg: if i have an element i want to find, which diagram does that element belongs to? if it is not there on diagram i won't get any result but if it does belong then i would get the result of diagram.

Is there a way to do this using EA API.

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: Get the diagram details of an element
« Reply #1 on: August 16, 2011, 04:22:03 pm »
Hi,

How would you define "belong to"? I've never heard of an element belonging to a diagram.
If you want to see on which diagrams an element is shown then you better use an SQLQuery()

Geert

sspvirgo

  • EA User
  • **
  • Posts: 24
  • Karma: +0/-0
    • View Profile
Re: Get the diagram details of an element
« Reply #2 on: August 17, 2011, 01:44:32 am »
Hi Geert,

I am storing all elements from the model in my (.NET) collection class which contains all properties of an element. I am recursivley iterating the packages of the model and storing all the details in my collections but i could not figure out of how to get the diagram id of that element so that i can store that in my collection.

So what i am doing is that, I am storing objects in the collection which has all the properties of an EA.element

If i want to check certain element from my collection that for eg: are you there on diagram i will see the diagram id in the object that is there in my element collection(.Net) if it is there then i know it does belong to that diagram.

It can be done only using SQL query ? Is there any other options to do that by using the EA API.

Thanks