Cancel
Showing results for 
Search instead for 
Did you mean: 

ug_convert_part

PLM World Member Pioneer PLM World Member Pioneer
PLM World Member Pioneer

A few years ago someone posted on how to create a .bat file where all you had to do was drag the file over the icon(ug_convert_part) to convert a metric file to inches. updated from nx 10 to nx 12.0.7 and it doesn't work. The file has been moved to NXBIN directory rather than in UGII directory. change the .bat file to NXBIN and still doesn't work.

any suggestions.

 

old way works in NX10

@@echo of
set PATH=%PATH%;%UGII_ROOT_DIR%
"%UGII_ROOT_DIR\%ug_convert_part.exe" -in %1
pause

 

tried changing it this way doesn't work NX12

@echo off
set PATH=%PATH%;%NXBIN_ROOT_DIR%
"%NXBIN_ROOT_DIR\%ug_convert_part.exe" -in %1

 

can't convert  NX12 part on NX10 convert.bat file
pause

 

6 REPLIES

Re: ug_convert_part

Legend
Legend

Have you tried :

%UGII_BASE_DIR%\nxbin\ug_convert_part.exe -in %1
Production: NX11.0.2.7,VERICUT 8.1.2
Development: Tcl/Tk, Gnuplot
www.adgroupe.com

Re: ug_convert_part

Siemens Phenom Siemens Phenom
Siemens Phenom

You replaced UGII_ROOT_DIR with NXBIN_ROOT_DIR. That variable does not exist.

 

Use this replacement instead: replace %UGII_ROOT_DIR% with %UGII_BASE_DIR%\nxbin:

 

@echo off
set PATH=%PATH%;%UGII_BASE_DIR%\nxbin
"%UGII_BASE_DIR%\nxbin\ug_convert_part.exe" -in %1

 

Re: ug_convert_part

PLM World Member Pioneer PLM World Member Pioneer
PLM World Member Pioneer

it worked thanks for the quick reply

Re: ug_convert_part

PLM World Member Pioneer PLM World Member Pioneer
PLM World Member Pioneer

whoops i thought it worked but when i reopen the file it's still in metric. when I go to information it's in MM. when i go into create a line it's asking for MM also.

Re: ug_convert_part

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

NOTE:

It does NOT convert expression units.

If you have ametric part with an expression being 1.23mm, when converted to inch, the expression will still be "1.23mm"

 

Look at the file units:

File -> Properties -> "Displayed part" tab -> Units

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


Re: ug_convert_part

Gears Esteemed Contributor Gears Esteemed Contributor
Gears Esteemed Contributor

Also note that whether the file is inch or metric, you can go to menu -> analysis -> units and change the unit that NX will use as input. For example, if your file is metric, but you'd like to create a sketch using inch dimensions, change the units to inch as above then create your sketch. All the linear dimension expressions will be created in inch units.

 

Alternately, you can keep the units as mm, then enter <inch value>[in] as the input in the dimension expression. NX will create a mm expression and convert the input from inches to mm for you.

 

Finally, if you have converted the part units and would also like to convert existing expression units, you can use this journal (use at your own risk, it is not built-in NX functionality).