cancel
Showing results for 
Search instead for 
Did you mean: 

Solid Bodies in Assemblies: NXopen

Creator
Creator

Hi All,

 

i need to select all the solid bodies of components of an assembly whhich is made of 100's of components.

 

any solution os of great help; thanks; FL

 

5 REPLIES

Re: Silid Bodies in Assemblies: NXopen

Esteemed Contributor
Esteemed Contributor

You don't say what version of NX, but...

On the selection toolbar is a filter.  Set to "Solid bodies"

Now I believe "select all" should work, or drag/rectangle select the entire window?

 

Or is that not doing what you want?

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: Silid Bodies in Assemblies: NXopen

Creator
Creator

Ken,

 

Thanks for your reply. This question in partcular to NXopen programming in C#.

i am using nx8.5 libraries,

 

Thanks, FL

Re: Silid Bodies in Assemblies: NXopen

Solution Partner Creator Solution Partner Creator
Solution Partner Creator

Try using below code, this should give you collection of all bodies(solid and sheet) in the part

 

BodyCollection bodyObjs = theSession.Parts.Work.Bodies;

Re: Silid Bodies in Assemblies: NXopen

Siemens Phenom Siemens Phenom
Siemens Phenom

I think the BodyCollection will only return bodies that live in the specified part.  So if you want the bodies that live in the component, you could cycle for objects of that type, ask if they are occurrences, and if they are, ask for the prototype.

 

OR...you could walk the assembly tree making each component the work part, and getting the body collection for each component.

 

 

Re: Silid Bodies in Assemblies: NXopen

Creator
Creator

Thanks Steve, this will work.