07-13-2018 04:13 PM
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
07-13-2018 04:21 PM
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
07-13-2018 04:25 PM - edited 07-13-2018 04:25 PM
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
07-13-2018 04:53 PM
it worked thanks for the quick reply
07-13-2018 05:20 PM
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.
07-13-2018 06:32 PM
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
Production: NX10.0.3.5 MP16/TC11.2
I'd rather be e-steamed than e-diseaseled
07-16-2018 07:33 AM
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).