Book a Demo

Author Topic: How to find the class referenced by Parameter  (Read 3242 times)

stanley

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
How to find the class referenced by Parameter
« on: April 29, 2019, 06:24:55 pm »
In Object model, A Parameter object represents a method argument and is accessed through the Method Parameters collection
we can use attribute:Type to find  The parameter type
it can be a primitive type or a defined classifier.
the IDualParameter's attribute "type_" is string type... without any other information about user-defined class.
Question: how to find the defined classifier  if the type_ point to some class? when we programming the addin...

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: How to find the class referenced by Parameter
« Reply #1 on: April 29, 2019, 06:41:44 pm »
EA.Parameter.ClassifierID

Geert

stanley

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: How to find the class referenced by Parameter
« Reply #2 on: May 01, 2019, 05:27:26 pm »
thanks.

for example:

But the Parameter.ClassifierID (value=211) completely different from Class Bar's ClassifierID (value = 0)

How to deal with it?
« Last Edit: May 01, 2019, 05:31:20 pm by stanley »

Eve

  • EA Administrator
  • EA Guru
  • *****
  • Posts: 8110
  • Karma: +119/-20
    • View Profile
Re: How to find the class referenced by Parameter
« Reply #3 on: May 01, 2019, 05:29:29 pm »
It references the class ObjectID

stanley

  • EA Novice
  • *
  • Posts: 3
  • Karma: +0/-0
    • View Profile
Re: How to find the class referenced by Parameter
« Reply #4 on: May 01, 2019, 05:50:21 pm »
oh..........got it.  8)

the value of Parameter.ClassifierID  is exactly the ID of the Element (ElementID). 

thanks  :)