Book a Demo

Author Topic: EA API : Element.getClassifierID method returns 0  (Read 7403 times)

Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
EA API : Element.getClassifierID method returns 0
« on: March 18, 2011, 01:14:12 am »
Hi,

I'm using a Java project that is running EA API and I have a problem with the following methods of the com.sparx.Element class :
.GetClassifierID(), .GetClassifierName(), .GetClassifierType()

Even though the elements of my EA projet have a classifier, these methods never return any value (either empty or 0)

Is this an issue with the EA API?
Note that I'm running EA v 7.5.850 so I'm using the corresponding eaapi.jar
Could it work with a newer version of EA like 8.864?

thanks

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com


Guillaume

  • EA Practitioner
  • ***
  • Posts: 1405
  • Karma: +42/-2
    • View Profile
    • www.umlchannel.com
Re: EA API : Element.getClassifierID method return
« Reply #1 on: March 21, 2011, 08:39:33 pm »
As an update, I found the solution to my problem :

in the case of using UML parts, I have to use GetPropertyType() which returns the element ID so you can look up for the classifier (e.g. a UML component) that matches it.

Guillaume

Blog: www.umlchannel.com | Free utilities addin: www.eautils.com