Book a Demo

Author Topic: ElementClass objects in any Diagram  (Read 3546 times)

Neocortex

  • EA User
  • **
  • Posts: 34
  • Karma: +0/-0
  • "There is no I in Team America"
    • View Profile
ElementClass objects in any Diagram
« on: October 29, 2009, 10:30:27 am »
Hi ... we want to programatically iterate throught the EA.ElementClass objects in a diagram.

NOTE: Not the EA.DiagramObject objects but the EA.ElementClass objects.

We can get a particular instance by selecting a lifeline in a sequence diagram and then finding the guid for that element from the properties window. Then using the API, we can call

EA.ElementClass diagramClass = (EA.ElementClass)Library.Repository.GetElementByGuid(guid);

But we cannot find these EA.ElementClass objects given some diagram, or some related DiagramObject, or EA.Element ...

Is there a way to iterate through the ElementClass objects in any given diagram?
« Last Edit: October 29, 2009, 10:57:34 am by simon.leserve »

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: ElementClass objects in any Diagram
« Reply #1 on: November 03, 2009, 07:04:44 pm »
What do you mean by "EA.ElementClass"? There nothing about that in the documentation. Isn't the EA.ElementClass the class that implements the EA.Element dual interface? In that case I don't think you are supposed to be used that, but just the EA.Element.

Geert

Neocortex

  • EA User
  • **
  • Posts: 34
  • Karma: +0/-0
  • "There is no I in Team America"
    • View Profile
Re: ElementClass objects in any Diagram
« Reply #2 on: November 06, 2009, 03:46:05 pm »
yes, you're right, I should just deal with the EA.Element instances ...  

it works now

... thanks heaps !