Add component attribute find number

The following journal is an extension of the code presented in the processing components tutorial.

This journal will recursively walk through the assembly structure and prompt for a "find number" to be added to each component as an attribute. Subsequent runs of the journal will ignore components that already have a unique find number attribute.

Change Hole Color

When run, the following script will change the color of the face of simple holes to blue (color 211), and threaded holes to yellow (color 6). The journal has been tested with NX 7.5.

 

Option Strict Off
Imports System
Imports NXOpen
Imports NXOpen.UF
Imports NXOpen.Features

Module HoleColours

Sub Main()

Creating a Subroutine to Process all Components in an Assembly

Occasionally you will want to process all the parts in a given assembly. The journal in this tutorial will recursively step through your assembly structure allowing you to process each part. If the code is run as provided, it will open a listing window and print the name of each component and the current active arrangement if it is a subassembly. This journal was developed on NX 7.5 native; therefore if you are running Teamcenter (or other PLM) some changes will need to be made.

 

Pages