Showing results for 
Search instead for 
Do you mean 
Reply

Get Top Level Component list of drawing File

Hello Team,

 

I want to get all the top level components/solids present in drawing file. I have tried to get it using below code but it gives all components but I am interested in top level. If you see the attached image I want only 3 componets 

1. TOYCAR_AXLE_ASSY

2. TOYCAR_WHEEL

3. LAYER_ORGANIZE_TEST_PART

 

but I get all componets i.e.

1. TOYCAR_AXLE_ASSY

2. TOYCAR_AXLE

3. RIGHT_WHEEL - (TOYCAR_WHEEL)

4. LEFT_WHEEL - (TOYCAR_WHEEL)

5. LAYER_ORGANIZE_TEST_PART

 

Please help me in getting top level componets present in drawing. 

 

Output should be as Required Output image...

 

Regards,

Rupali

1 REPLY

Re: Get Top Level Component list of drawing File

Sample program on the Solution Center:

 

https://solutions.industrysoftware.automation.siemens.com/view.php?sort=desc&dt=nx-api&q=%22report+a...

 

If my link doesn't work, search for nx_api3114.  The example is called "report all immediate component names whether open or not".