Cancel
Showing results for 
Search instead for 
Did you mean: 

Re: Easier ug_convert_part

Legend
Legend

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 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 
Rob Newcomb, CAD/CNC/Simulation manager
Elmhirst Industries, Specializing in Prototype sheet metal stampings and assemblies

Production: NX 12.0.2 / Autoform r8 /WorkNC 2019 r1
Testing:NX 1855
PC: Rave Cadbeast: Intel(R) i7-4790K CPU @ 4.GHz /32gb ram /NVIDIA Quadro P2000 on Win10 Pro

Re: Easier ug_convert_part

Honored Contributor
Honored Contributor
I am definitely interested.

Personally, I like the idea of a separate utility, vs registry edits. I don't think we will have that many users with the need to convert part units, and it will probably be easier for me to send a link to get, or the utility itself, vs. getting IT to make registry changes.
-Dave
NX 11 testing NX1847+ | Teamcenter 11 | Windows 10

Re: Easier ug_convert_part

Legend
Legend

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)

 

Regards

 

Frank Swinkels

 

Re: Easier ug_convert_part

Creator
Creator

Frank,

 

Thank you for this upload, can you provide the source code so that those that want to can update for NX12 on their own?

 

-Will

Re: Easier ug_convert_part

Honored Contributor
Honored Contributor

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.

-Dave
NX 11 testing NX1847+ | Teamcenter 11 | Windows 10

Re: Easier ug_convert_part

Attached is a zip file.  I have built the program for both NX12 and NX1847.

 

Regards

 

Frank Swinkels

Re: Easier ug_convert_part

Experimenter
Experimenter

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:

https://community.plm.automation.siemens.com/t5/Discussion-Forum-NX-Manufacturing/Importing-multiple...

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?

Thanks

Derek

Re: Easier ug_convert_part

Siemens Phenom Siemens Phenom
Siemens Phenom

@CompositeGuru , which NX version are you using?

Regards,
Samadhan

GTAC | NX Help: NX1102 | NX1202 | NX1847
Please mark post as an "Accepted Solution", if it answers your question/is more helpful!

Re: Easier ug_convert_part

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.

 

Regards

 

Frank Swinkels

Re: Easier ug_convert_part

Experimenter
Experimenter

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.

Derek