cancel
Showing results for 
Search instead for 
Did you mean: 

How to Determine Which Part(s) in an Assembly Have A Tube VB.NET, NX11

Valued Contributor
Valued Contributor

I would like to programmatically get a list of Part(s) in an Assembly that contains a tube - can anyone tell me how to do it?  Or guide me to the attributes or some properties that I can extract this imformation?

 

 

3 REPLIES

Re: How to Determine Which Part(s) in an Assembly Have A Tube VB.NET, NX11

Phenom
Phenom

You want to know which parts in the assembly contain a tube feature?

If so, you can iterate through the assembly and query the part navigator of each part to see which contains a tube feature.

 

Some examples of processing all the components in an assembly can be found here:

 

http://solutions.industrysoftware.automation.siemens.com/view.php?si=nx_api5372

 

http://solutions.industrysoftware.automation.siemens.com/view.php?si=nx_api3887

 

http://nxjournaling.com/content/creating-subroutine-process-all-components-assembly

Re: How to Determine Which Part(s) in an Assembly Have A Tube VB.NET, NX11

Valued Contributor
Valued Contributor

I understand the loop throught the assembly, and I got this module programmed. I am having troubel to  "query the part navigator of each part to see which contains a tube feature". Can you explain it more? I need to do it programmably(show me a list of parts that have tube) - I guess there should be a way to go into the part and loop for each portion.

 

Re: How to Determine Which Part(s) in an Assembly Have A Tube VB.NET, NX11

Phenom
Phenom

Once you have a reference to a part, you can access its feature collection and look for a tube feature.

 

for each tempFeat as features.feature in thePart
    if TypeOf(tempFeat) is NXOpen.Features.Tube then
        'we found a tube feature, log this part
'stop looping through this part's features and skip to next part if desired
continue for end if next