Export assembly (with drawings)

The code below was submitted by site user: peter.t.

This journal is intended to clone an assembly of parts with their drawings in preparation for delivery to a customer or third party. The journal expects that there will be no parts open when it is initially run; it will prompt you to open a part. It will then attempt to load and clone the assembly. If there is a drawing of a part in the same directory as the part, it will be cloned along with the assembly. The drawing file name must match the model file name with "_dwg1" appended to it; if the part name is "12345.prt", it will look for a drawing named "12345_dwg1.prt". If you follow a different drawing naming convention, modify the journal code accordingly before running it. Also, the initial directory for the "file open" dialogs can (and should) be customized to your environment.

A big thank-you to peter.t for sharing his code!

Create screenshot and save to Windows clipboard

The following journal will create a screenshot of the current NX graphics window (using a white background) and place the resulting image on the Windows clipboard. After running the journal, you can immediately paste the image into another application (email message, powerpoint deck, paint program, etc.). The resulting image is cropped,except for a user-specified amount of white space around the image.


When dealing with any CAD program, it is vital to know what system of units you are currently working in. Without a system of units it would be impossible to know how large the object is that you are designing. What is the estimated weight of the object? What is the estimated inertia about the drive axis? Is the design within a balance specification? These questions would be difficult, if not impossible, to answer without knowing the unit system in the current part. As such, unit systems are very important when modeling.


Expressions: creating expressions (no units)

Now that we've seen how to query existing expressions, this article will take a look at creating new expressions. The code in this article will demonstrate how to create number expressions (unitless), number expressions that reference existing expressions in the formula, string expressions, boolean expressions, integer expressions, point expressions, vector expressions, and list expressions. Also, the code will show how to find and edit existing expressions.