Siemens NX Tooling

DeltaUnits: NX Unit Converter

Status: Complete
Language: Python
Interface: GUI + CLI
DeltaUnits GUI - File selected, converting to mm

DeltaUnits GUI - File selected, converting to mm

Analysis & FEA

Siemens NX comes with the unit conversion executable called ug_convert_part.exe; however, it is located inside the installation folder of Siemens NX and requires command line execution. The tool will automatically detect the location of the executable file by checking the predefined list of possible installation folders for Siemens NX products (for various Siemens NX product versions), and adding that folder to the system environment variable PATH.

Manufacturing

Built in Python with two interchangeable entry points: a Tkinter GUI (file browser plus an in/mm dropdown) for everyday use, and an argparse-based CLI for scripting or batch conversion. Both call the same underlying wrapper batch file via subprocess, then report success or failure back to the user. The GUI version was packaged into a standalone .exe with PyInstaller so it can run on a lab machine without a Python environment installed.

Testing

Console Log - NX install auto-detected, conversion succeeded
Console Log - NX install auto-detected, conversion succeeded
BEFORE - airfoil.prt, Units: Millimeters
BEFORE - airfoil.prt, Units: Millimeters
AFTER - airfoil.prt, Units: Inches
AFTER - airfoil.prt, Units: Inches

Results

Verified Performance
01

Working End-to-End

Successfully converts NX .prt files back and forth between mm and in through either GUI or CLI, with auto-detection of NX installation verified against an actual NX Student Edition install.

02

Verified Conversion

Verified through NX's own Displayed Part Properties dialog: The same airfoil.prt file had Units: Millimeters before conversion and Units: Inches after, confirming that the tool changes the unit state of the file itself, not just a display parameter.

03

Standalone Deployment

Packaged as a standalone Windows EXE file, allowing end users to execute the converter without installing Python and its dependencies on their computers.

Lessons Learned

"The difficulty wasn't converting units; NX can already do that. The real challenge was in the hassle of locating and using the tool in NX each and every time. Using the power of an existing, reliable unit converter and adding auto-detection and a user-friendly interface to it solved the problem with significantly fewer lines of code and potential bugs."

Skills Learned

PythonTkinter (GUI)argparse (CLI)Batch ScriptingPyInstaller