Skip Navigation LinksWorking-with-Units-in-NX


Working with Units in NX 

Click here to see a video for this article.

In this installment of NX A to Z, I will explain how to use the unit conversion utility for NX.  I will also show how to change the units on a drawing without changing the units of the part file.


ug_convert_part is a utility that comes with NX for converting the units for a part from millimeters to inches and vice versa, so if you create a part using the wrong units or you receive a file from a customer or supplier and it is the wrong units, you can convert it.  The unit conversion utility is a DOS program and therefore, has to be run from a command prompt.  NX ships with a command prompt that is pre-configured to run ug_convert_part from any directory and therefore, it is much easier to use than the regular windows command prompt.  So, get into the windows start menu and browse to the UGS NX 7.5 folder, click on the NX Tools folder and then click on Command Prompt and you should see the window shown below

Now, the next step is to navigate to the folder where the file is that you want to convert.  So, let’s say that my file is in N:\Endesin\Convert Units – I would first need to change the drive letter from C: to N: so I just type N: and hit Enter.  Then to get to Endesin\Convert Units, I type cd Endesin\Convert Units.

Now, we need to run the ug_convert_part program.  If you just type in ug_convert_part and hit Enter, you will get information on how to use it as follows

So, basically, you type ug_convert_part and then -in or -mm depending on whether or not you want to convert the part to inches or millimeters, then you type in the filename if you just want to do one file, or you can type –d if you want to do the entire directory of you can type –d –s if you want to convert the entire directory and its subdirectories.


Probably the best way to explain this is with examples.
To convert a part in N:\Endesin\Convert Units called test.prt from inches to millimeters:
ug_convert¬_part –mm test.prt

To convert the entire Convert Units directory from millimeters to inches:
ug_convert_part –in –d

To convert the entire Convert Units directory and its subdirectories from inches to millimeters:
ug_convert_part -mm –d –s –s

That’s pretty much it.  You don’t have to navigate to the folder where the files are that you want to convert, you can just add the path to the filename argument for ug_convert_part (or type in the directory path after the –d), but I recommend navigating to the folder, because if I include the path with the filename, I have to type it in about 5 times before I get it right.

Drawing Units

If all you want to do is change the dimension on a print from inches to millimeters or vice versa you can make those changes to the drawing dimensions directly without having to change the units for the underlying part file.  Just place the cursor over the dimension you want to change, right click and select Style, click on the Units tab and change the Units as shown below.  If you have tolerances on the dimensions, then you can click the Convert Tolerance Value when Changing Units box to automatically have the tolerances converted as well.

If you want to change all of the dimensions at once, just change the selection filter to Dimension and then press Ctrl+A to select every dimension, then go to the Edit menu and click on Sytle.  Make sure the entire drawing is visible when you hit Ctrl+A, and make sure you change the selection filter back to No Selection Filter when you’re done.


Measuring Units

You can also change the units that are displayed using the measuring tool and the information window without changing the units of the part file.  Just go to Analysis Units and select the units you want.

That’s it for units.  Hope this was helpful.

Dave Holland