Engineer Meet NX Journaling

Journal is a powerful tool in NX/Unigraphics that allows common Engineering routines to be automated. This website is being designed for the Engineer with a modicum of programming knowledge who desires to create journals in NX/Unigraphics. We will rely predominately on the coding learned from Visual Basic to create our journals. If you are a complete novice to programming, you may find it best to grab an easy Visual Basic(VB) book from your local library and familiarize yourself with the basics code writing before attempting to create your own journals.

Report Missing Parts List Balloons

When working with a parts list on an assembly drawing, it can be difficult to determine if each item in the list has an associated callout balloon on the drawing. NX offers no command to report those items that have missing callouts; the usual course of action is to print a copy of the drawing and manually working through the parts list marking off those items for which you find a balloon. Frank Berger (of GTAC) has recognized this shortcoming and has written a journal that when run will report which items in the list have no corresponding balloon callout.

Using VectorArithmetic.Vector3

The NXOpen.VectorArithmetic Namespace has three classes: Matrix3, Quaternion and Vector3. The
example journal below shows the ease that the vector3 object can be created and used. The code
ask the user to select a datum plane and a datum axis and then creates a point on the datum plane
at the intersection point with the datum axis direction. The journal will not work if the datum plane
normal is perpendicular to the datum axis.

Placing a dimension break

When manually placing a dimension gap symbol (a symbol that creates a small break in a dimension line), it can be difficult to get the proper placement because the gap symbol has no visible geometry and therefore gives no useful feedback during the placement process. However, if you move the symbol after placing it (as you will likely need to), a small, temporary rectangle is drawn (overlay graphics) to show the outline of where the gap will be placed. Why the rectangle isn't shown when initially placing the symbol seems to be a bit of an oversight - one that we can correct with a bit of code.

Overlay Graphics

Do you need to allow the user to select a screen position? Would you like to provide some feedback as they move the cursor around the screen? If so, the SpecifyScreenPosition function and the overlay graphics primitives are just what you need. The SpecifyScreenPosition function allows you to define a "motion callback function" that will be called each time a mouse movement is detected. If you have created any Windows forms applications, this would be very similar to the MouseMove event. The motion callback works with Overlay Graphics Primitives (OGP) to allow for some cool graphical effects that are very useful for user feedback. Think about using a selection rectangle or lasso in NX; there is visual feedback regarding the size and position of the selection method, but they are just temporary objects - you don't end up with four new lines in your part file each time you use a selection rectangle.


Subscribe to NX Journaling RSS