Showing results for 
Search instead for 
Do you mean 
Reply

identification of reference only components

[ Edited ]

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.

--

Dennis Paul Himes
CSC

Disclaimer: "True, I talk of dreams; which are the children of an idle brain, begot of nothing but vain fantasy; which is as thin of substance as the air."
- Romeo & Juliet, Act I Scene iv Verse 96-99
5 REPLIES

Re: identification of reference only components

Check to see if the part has the "REFERENCE_COMPONENT" attribute set.

Re: identification of reference only components

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.

Mike

NX 10 TC11.2
www.astonmartin.com

Re: identification of reference only components

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()?

--

Dennis Paul Himes
CSC

Disclaimer: "True, I talk of dreams; which are the children of an idle brain, begot of nothing but vain fantasy; which is as thin of substance as the air."
- Romeo & Juliet, Act I Scene iv Verse 96-99

Re: identification of reference only components

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?

 

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: identification of reference only components

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.

--

Dennis Paul Himes
CSC

Disclaimer: "True, I talk of dreams; which are the children of an idle brain, begot of nothing but vain fantasy; which is as thin of substance as the air."
- Romeo & Juliet, Act I Scene iv Verse 96-99