Continue to Site

Eng-Tips is the largest engineering community on the Internet

Intelligent Work Forums for Engineering Professionals

  • Congratulations IDS on being selected by the Eng-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to setup ug_convert_part batch file on Windows 7 1

Status
Not open for further replies.
Replies continue below

Recommended for you

John R Baker uploaded a batch file to Eng-Tips a few days ago. When run, it created registry entries for NX part files to give RMB options for Assembly Information (ugpc.exe) and NX Part Version (ug_inspect.exe). I modified it to add in the convert part units for mm & inches.
Below is the code, copy & paste into a empty text file, save it, then rename the extension to .bat
Run it by double clicking and as long as you have admin rights, it will update the registry entries for NX part types.

Code:
@echo off
:: (c) 2015 joe.petach@siemens.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

Anthony Galante
Senior Support Engineer


NX3 to NX10 with almost every MR (21versions)
 
On a side note, back in the NT4 days I had convert STEP and Convert Iges commands on the file open with .
I cannot remember how I did it, I'm assuming it was from something someone posted on the old bbs board.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor