I was going to post that file as well, I dont use it anymore though.
I found this on the board awhile back. save as a bat file and run it. it adds some useful rmb commands. including convert units.
@echo off :: (c) 2015 email@example.com :: :: This script will add two commands to the Windows Explorer context menu for NX .prt files. :: NX Version and NX Assy Info :: setlocal ENABLEDELAYEDEXPANSION echo; echo Adding command NX Assy Info echo; reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX Assy Info\command" /t reg_sz /d "cmd.exe /s/c \" @\"%UGII_BASE_DIR%\ugii\ugpc.exe\" -s -a \"%%1\" ^& pause \" " /f echo; echo Adding command NX Version echo; reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX Part Version\command" /t reg_sz /d "cmd.exe /s/c \" @\"%UGII_BASE_DIR%\ugii\ug_inspect.exe\" -release \"%%1\" ^& pause \" " /f echo; echo Adding command NX Convert Units echo; reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX Convert to mm\command" /t reg_sz /d "cmd.exe /s/c \" @\"%UGII_BASE_DIR%\ugii\ug_convert_part.exe\" -mm \"%%1\" ^& pause \" " /f echo; echo Adding command NX Convert Units echo; reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX Convert to Inches\command" /t reg_sz /d "cmd.exe /s/c \" @\"%UGII_BASE_DIR%\ugii\ug_convert_part.exe\" -in \"%%1\" ^& pause \" " /f echo; echo NX commands added to the context menu for .prt file. echo. :EOF
Elmhirst Industries, Specializing in Prototype sheet metal stampings and assemblies
Production: NX 12.0.2 / Autoform r8 /WorkNC 2019 r1
PC: Rave Cadbeast: Intel(R) i7-4790K CPU @ 4.GHz /32gb ram /NVIDIA Quadro P2000 on Win10 Pro
Attached is a zip file that contains the program. Some points to note.
1. This will only work with pre NX11. NX11 has the ug_convert_part in a different location (NXBin) so that the current program will not be able to be found.
2. The program relies on the env UGII_ROOT_DIR is correctly set (not to NX11)
Has anyone happened to update this to NX1847?
or maybe @FrankSwinks could share the source code? I may be able to get one of our programmers to look at updating it.
Awesome utility Frank.
I have been using a batch file to import stp files, and figured the same thing would be possible to convert NX part units...
The batch file is explained here:
It works very well for translating lots of parts quickly without a GUI, or having to poke through file structure - just drag the stp file from windows onto the batch file.
Anyway, I have not had any luck making ug_convert_part behave the same way. Has anyone else?
Using copy/paste does not work for this utility. That is why there are two part file selection groups. The first one is to select all part files in a directory. The second selection group allows one to highlight any number of part files in a directory. If as result of incorrect selection, the remove entries button will clear the entries. Probably an extra button to clear selected entries could be useful. Let me know if there is any interest in that.
A similar windows dialog for step/iges conversion is very possible. Let me know if that would be of use.
Thanks Frank. There is already a GUI for the STP to NX translator, but the batch file method is quicker, which is why I was looking for a similar Inch to Metric converter. But this one you've written looks great, and does what we need in lieu of drag and drop functionality. Thanks again.