How to differentiate between parts and part assembly using TCL?
While importing CATPart, I get various parts and part assemblies in the PART browser
While using hm_entitylist parts name/id
I get list of names/ids of the model, parts and part assemblies altogether.
From this list, how to distinguish if the entity is a part/model/part_assembly using TCL command?
I tried using hm_getvalueparts name="name" dataname=children
for parts, this command returns 0(zero). But the children value is the same even for empty part assembly.
So I would like to know if there is any dataname or any other tcl command to distinguish parts and part assembly.
Additional question : Is there any way to list all existing datanames for an entity using TCL?
I looked up the datanames page from the Altair Help Documentation, but I couldn't find PARTS in the list, instead I was able to find PARTSETS.
Thanks and Regards,
Akash P
Answers
-
hello @Akash Purushothaman ,
hm_attributelist is a command which allows you to review all attributes for a given entity. You can either request for the attribute label (recommended) or attribute id.
That said, we deceided not to expose yet Part attributes. The reason is, there were many customizations (we can even say each company has their own customization) in the past regarding components, assemblies, materials, properties, ...
We have delivered for a couple of versions a part-based workflow which is adressing many past scenarios, with no need to produce as many automation effort as in the past.
May I ask you for the full picture, what is the automation you are trying to set up with Parts?
Best Regards,
Michael
1 -
Michael Herve_21439 said:
hello @Akash Purushothaman ,
hm_attributelist is a command which allows you to review all attributes for a given entity. You can either request for the attribute label (recommended) or attribute id.
That said, we deceided not to expose yet Part attributes. The reason is, there were many customizations (we can even say each company has their own customization) in the past regarding components, assemblies, materials, properties, ...
We have delivered for a couple of versions a part-based workflow which is adressing many past scenarios, with no need to produce as many automation effort as in the past.
May I ask you for the full picture, what is the automation you are trying to set up with Parts?
Best Regards,
Michael
Hello @Michael Herve ,
Thank you for the option. I am trying to access the metadata using TCL. Based on the metadata, we select few standard parts and assign materials.
And inorder to access the proper metadata, I need to make sure that I am accessing from a part and not from part assembly. Anything toward that direction would be helpful!
Thanks in Advance!Akash P
0 -
Akash Purushothaman said:
Hello @Michael Herve ,
Thank you for the option. I am trying to access the metadata using TCL. Based on the metadata, we select few standard parts and assign materials.
And inorder to access the proper metadata, I need to make sure that I am accessing from a part and not from part assembly. Anything toward that direction would be helpful!
Thanks in Advance!Akash P
Hello again,
assigning a material should not require automation anymore, as it is now available as a core feature. You just need to define (or map with CAD metdata) the PDM Material attribute of parts, as shown in the video below:
https://youtu.be/DL5bsj2FCTk?si=otOlFY9OkLhUF53t
Best Regards,
Michael
0