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.


Using Mask Triples from the SelectObject Routine

As we saw in Beginning Selections, the SelectObject(...) method provides a fairly quick and easy way to allow the user to select one or more objects. However, if you need interactive selection, but the ‘type array’ method could not provide enough control; allow me to introduce you to the selection method using mask triples.


Using SelectObject(...)

Adding an Interactive Selection Routine using SelectObject(...) and SelectObjects(...)

Adding an interactive selection routine also allows you to generalize your journal and make it more useful. Limiting, or filtering the allowed selection types is vital to getting your journal to work correctly.  The selection object will give you the power and flexibility needed for selecting one or more objects of one or more different types.

Using the Basic SelectObject(...)