In the Assembly Navigator there's a column titled "Info". Some components have an icon in this column which looks like a book and which has the tool tip "Part is Reference Only". Is there anyway to programmatically find out which components have this property? Preferably in C UGOpen, which is what the ufunc I'm updating is written it.
The "REFERENCE_COMPONENT" attribute is unusual in that it is present if set, but not there if not set. This means that you would need to check for the presence of this attribute to determine the setting.
Well, this kind of works. I have a part A with a component B, which has components C, D, and E. When right click on the various parts in the Assembly Navigator I see that B, C, D, and E all have the REFERENCE_COMPONENT attribute. However, when my code recurses through the assembly structure with UF_ASSEM_ask_all_part_occ_children() and checks for REFERENCE_COMPONENT with UF_ATTR_ask_part_attrs( UF_ASSEM_ask_prototype_of_occ( childTags[ii])) it finds the REFERENCE_COMPONENT attribute for C, D, and E but not for B.
How can a part attribute show up interactively in NX, but not in UF_ATTR_ask_part_attrs()?
It could depend on exactly which part it is set in.
E.g. B could be set in A, but CDE are set in B?
If your code only check components of A (not A itself) it could catch CDE but n ot B.
i.e. Are you sure you are checking the components of A, or just the components of sub-assemblies of A?
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled
Sorry to take so long to respond; I got pulled off onto another project.
Anyway, I found the solution. I used UF_ATTR_cycle() instead of UF_ATTR_ask_part_attrs( UF_ASSEM_ask_prototype_of_occ()) and it worked.