Book a Demo

Author Topic: find a class for an object  (Read 4606 times)

xhanness

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
find a class for an object
« on: August 10, 2009, 07:08:11 pm »
Hello,

it is possible to find a parent class for a particular object ? I mean, when I make a instance of a class I got an object. Is there a way to trace, which class (Element) served for instantiating? I must consider, that there can be more classes with the same name in my model (in different packages) so I just can not use a "depth searching" for a class name in my model.

thanks for any hints !

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13523
  • Karma: +574/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: find a class for an object
« Reply #1 on: August 10, 2009, 07:44:10 pm »
Since you are posting this in the Automation Interface ... forum I guess you are searching for a programatic solution using the API?
In that case you can get the ClassifierID from an element.
Use that ID in the operation Repository.GetElementByID and you should get the "parent" element you are looking for.

Geert

xhanness

  • EA User
  • **
  • Posts: 32
  • Karma: +0/-0
    • View Profile
Re: find a class for an object
« Reply #2 on: August 10, 2009, 09:13:24 pm »
Thanks Geert !
 :)