Cancel
Showing results for 
Search instead for 
Did you mean: 

Converting Units

Pioneer
Pioneer

I used to have a right click item to convert units in prt fileswhen I had up to NX9, since upgrading to NX 10 cannot get the menu to show or work and I tried reinstalling the default programs editor and it shows that it is there but nothing shows on right click anymore

 

NX10.0.2.6

Mike

NX 11.0.2.7
Win 7
10 REPLIES

Re: Converting Units

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

This is what I use and it works fine with NX10.

Copy & paste the code below into an empty text file, save, then rename the extension to .reg and double click the file.

This will import into the registry for the NX part file type.

Mine is set to do a bit more than the original (see image).

 

2015-10-28_8-59-27.jpg

 

 

 

 

 

@echo off
:: (c) 2015 joe.petach@siemens.com
::
:: This script will add four commands to the Windows Explorer context menu for NX .prt files.
:: NX Version and NX Assy Info and the ability to convert NX parts to mm or inches, by RMB on a file in Windows Explorer.
:: must have admin rights for it to work.
::
setlocal ENABLEDELAYEDEXPANSION
echo;
echo Adding command NX Assy Info
echo;
reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX.1 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.2 Part Version\command" /t reg_sz /d "cmd.exe /s/c \" @\"%UGII_BASE_DIR%\ugii\ug_inspect.exe\" -ps \"%%1\" ^& pause \" " /f
echo;
echo Adding command NX Scans for known part corruptions
echo;
reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX.3 Corrupted Part\command" /t reg_sz /d "cmd.exe /s/c \" @\"%UGII_BASE_DIR%\ugii\ug_inspect.exe\" -scan \"%%1\" ^& pause \" " /f
echo;
echo Adding command NX Convert Units to mm
echo;
reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX.4 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 to Inches
echo;
reg.exe add "HKEY_CLASSES_ROOT\UGpartfile\shell\NX.5 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
PhoenxPLM
24 versions of NX installed: NX4 to NX12, plus TC11.2

Re: Converting Units

Pioneer
Pioneer

I get this error when I tryto run (see attached)

 

Mike

NX 11.0.2.7
Win 7

Re: Converting Units

Pioneer
Pioneer

I get this error message when trying to run

NX Convert Error Msg.png

Mike

NX 11.0.2.7
Win 7

Re: Converting Units

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

It's most likely the text editor you've saved the reg file with has changed the format of the file.

have a look at http://superuser.com/questions/641452/you-can-only-import-binary-registry-files-from-within-the-regi... it has some suggestions which might help.

 

Anthony Galante, Senior Support Engineer
PhoenxPLM
24 versions of NX installed: NX4 to NX12, plus TC11.2

Re: Converting Units

Pioneer
Pioneer

I went to web site and found I needed to put 

 

Windows Registry Editor Version 5.00 and Blank line

 

at top of file it then ran and said sucessful but still nothing showing on right click. Same as the old program said everything was there but nothing shows, I am wondering if our IT has put something to prevent showing any non std right click options.

Mike

NX 11.0.2.7
Win 7

Re: Converting Units

Esteemed Contributor
Esteemed Contributor

Anthony -

The code in your "code" window is a .BAT file, not a .REG file.

 

Save the code (un-altered) into a text file, rename it whatever.BAT, and run it.

 

Should work a bit better ;-)

Ken Akerboom Sr CAx Systems Engr, Moog, Inc.
Production: NX10.0.3.5 MP5 + patch/TC11.2
I'd rather be e-steemed than e-diseaseled


Re: Converting Units

Pioneer
Pioneer

OK, ran as BAT file with run as administrator and it is there Thanks to everyone for there help

much appreciated

 

Right Clik.png

Mike

NX 11.0.2.7
Win 7
Highlighted

Re: Converting Units

Solution Partner Phenom Solution Partner Phenom
Solution Partner Phenom

homer-slap-forehead.jpg

 

Ken, thanks for pointing that out, you'd think I would know better!

Anthony Galante, Senior Support Engineer
PhoenxPLM
24 versions of NX installed: NX4 to NX12, plus TC11.2

Re: Converting Units

Pioneer
Pioneer

I just upgraded to 11 for testing. So when I run the convert it converts the file to the latest version of NX11. I would like this to convert it to NX9 or 10. What would be the simpliest way to fix this. I thought about just temporarily changing the environent variable of the ugii_base_dir but not sure if this is the best way to accomplish this.

Learn online





Solution Information