Author Topic: How to get Classifier ID/GUID for item of type 'PART'  (Read 3713 times)

sravang

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
How to get Classifier ID/GUID for item of type 'PART'
« on: February 05, 2021, 06:03:03 pm »
Hello,

I want either ID/GUID of the classifier of element of type 'PART' to process them under associations.
I know that in case of sql query the GUID can be retrieved from 'PDATA1' column of t_object table. But I want that ID through API. I tried element.ClassifierID but it returns 0.

Thanks,
Sravan

Geert Bellekens

  • EA Guru
  • *****
  • Posts: 13402
  • Karma: +566/-33
  • Make EA work for YOU!
    • View Profile
    • Enterprise Architect Consultant and Value Added Reseller
Re: How to get Classifier ID/GUID for item of type 'PART'
« Reply #1 on: February 05, 2021, 06:58:37 pm »
PData corresponds to Element.MiscData

Geert

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: How to get Classifier ID/GUID for item of type 'PART'
« Reply #2 on: February 05, 2021, 07:04:35 pm »
I got the right value from ClassifierID. Looked at an Object being classified. But indeed, a Part returns 0. Will have to look...

q.
« Last Edit: February 05, 2021, 07:06:46 pm by qwerty »

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: How to get Classifier ID/GUID for item of type 'PART'
« Reply #3 on: February 05, 2021, 07:09:02 pm »
Indeed MiscData(0) contains the GUID of the classifier. EA strikes again!

q.

Takeshi K

  • EA User
  • **
  • Posts: 593
  • Karma: +39/-1
    • View Profile
Re: How to get Classifier ID/GUID for item of type 'PART'
« Reply #4 on: February 05, 2021, 08:03:33 pm »
Please try Element.PropertyType.

HTH,
--
t-kouno

sravang

  • EA User
  • **
  • Posts: 33
  • Karma: +0/-0
    • View Profile
Re: How to get Classifier ID/GUID for item of type 'PART'
« Reply #5 on: February 05, 2021, 08:20:00 pm »
Element.MiscData worked.

Thanks Geert,q for your response.

Thanks,
Sravan

qwerty

  • EA Guru
  • *****
  • Posts: 13584
  • Karma: +396/-301
  • I'm no guru at all
    • View Profile
Re: How to get Classifier ID/GUID for item of type 'PART'
« Reply #6 on: February 05, 2021, 09:52:18 pm »
Please try Element.PropertyType.

HTH,
That returns the ID. Funny though, it's not called PropertyTypeID. Ah, forgot, it's EA.

q.