Blend Reference Cleaner

remove missing parents from edge blend features

I don't think this will come as news to anyone, but edge blend features depend on edges in the model. This sounds really obvious (which it is), but given how even minor edits can create or remove dozens of edges, it is surprising how stable the edge blend features really are. When a parent edge is modeled away, the edge blend feature will 'remember' where it used to be and display a warning icon in the feature tree. Occasionally, these warnings are very useful to track down unintentional changes; but more often than not, you are well aware of the changes and simply want to remove the old blend parents and get rid of the warning.

Print all open drawings

The following journal code will print all drawing sheets from all fully loaded part files to your default printer. This can be useful if you want some quick print outs for reference. It should use the default paper size for your printer. If it does not, or you prefer a different paper size, you can uncomment or add the appropriate paper size in the PrintSheet subroutine.

Creating Arcs, part 1

Creating Unassociative Arcs

In this tutorial, we'll look at creating unassociative arc objects. So, with all the whiz-bang technology in NX, why look at unassociative arcs? The answer is three-fold:

  • the creation methods are simple and straightforward
  • the methods will introduce other NX data structures
  • the geometry itself is perfectly valid and useful for modeling operations, title block geometry, logo art, etc

In short, the goal of this tutorial is to show you how to create useful geometry and introduce you to a few concepts that you will run into again when working with other NX object types.


The API offers three basic ways to create unassociative arcs:

  • through three specified points
  • with a given center point, orientation matrix, radius, start angle, and end angle
  • with a given center point, an X vector, a Y vector (together, the vectors will define the arc's orientation matrix), radius, start angle, and end angle

We'll take a look at each in turn.

Find Duplicate Sheet Bodies

Find Duplicate Sheet Bodies

It can be easy to duplicate geometry in a CAD file, especially when importing from 'neutral' formats such as IGES. The journal below helps to identify duplicate sheet bodies. It will scan through the sheet bodies in the work part looking for potential duplicates. It is intended to be used on sheet bodies comprised of a single face each (such as imported IGES geometry, when the 'automatic sew' option is not used). By default, the journal moves any potential duplicates to layer 255 (change this to your preference in the code before running the journal). I suggest inspecting them more closely before doing something more drastic such as deleting them out of the file. The method used to find duplicates is not 100% guaranteed; but most of the misidentified matches in my testing have been due to suspect input geometry (Garbage In - Garbage Out, as always).

Sort a list of NX objects

Sort a list of custom objects

The .NET List object is a great way to store a collection of related objects; objects can be added and retrieved easily and the List can quickly be converted to an array for NXOpen methods that require an array. The List object even has a .Sort method that works great with native data types (string, integer, double, etc). But, if you have ever wanted to sort a list of NX objects, such as drawing sheets by name, the default .Sort method may error out or give unexpected results. The good news is: there is an overloaded version of the .Sort method that allows you to specify exactly what to sort by and how. This is accomplished by writing a custom function that ranks the objects and telling the .Sort method to use the custom function.

Pages