You are on page 1of 2

@echo off

REM # ==================================================================== #
REM SCRIPT TO RUN NXTOCGMDIRECT TRANSLATOR
REM # ==================================================================== #

REM Replace CHANGE_ME with correct values as shown in Example


REM Set TC_ROOT To Directory where TeamCenter is installed
REM Example set TC_ROOT=d:\Tceng0910
REM Check if TC_DATA is valid.
set TC_ROOT=D:\PLM\TC11\tc_root
set TC_DATA=D:\PLM\TC11\tc_data

REM By default the variables below will be set as environment variables when Nx is

REM installed. Set these values below in case the environment variables are not
set.
REM
REM Set UGII_BASE_DIR To Directory where Unigraphics is installed
REM Example set UGII_BASE_DIR=D:\Progra~1\UGS\UNIGRA~1.0
REM For Nx5 and above - set SPLM_LICENSE_SERVER To UG license
REM Example set SPLM_LICENSE_SERVER=2100@sol001
REM
set UGII_BASE_DIR=C:\PROGRA~1\Siemens\NX11~1.0
set SPLM_LICENSE_SERVER=28000@HOUTMCTRLS01.vitro.com

setlocal

@set PARAM1=%1

if x%PARAM1%== x goto help


if %1== -help goto help

goto setenv

:help

echo Usage:
echo Translator executable name: nxtocgmdirect.bat
echo Command String is:
echo nxtocgmdirect.bat inputFile
echo Where one parameters is passed:
echo Param 1) is the input file which has the @DB String
echo Example:-
echo nxtocgmdirect.bat e:\ug_data\part.txt
goto :EOF

:setenv

if "%UGII_BASE_DIR%"=="" (
echo UGII_BASE_DIR is not set.
EXIT 1
)

set UGII_ROOT_DIR=%UGII_BASE_DIR%\UGII

if "%SPLM_LICENSE_SERVER%"=="" (
echo SPLM_LICENSE_SERVER is not set.
EXIT 1
)

set OLDPATH=%PATH%

if "%TC_ROOT%"=="CHANGE_ME" (
echo set TC_ROOT
EXIT 1
)

set PATH=%UGII_ROOT_DIR%;%PATH%;

REM Command String To Execute The NXToCgmDirect Translation

"%UGII_BASE_DIR%\Ugmanager\export_ugdwgimages.exe" -all -text=text %*

set EXITVALUE=%ERRORLEVEL%

set PATH=%OLDPATH%

:end

endlocal

@echo on

EXIT %EXITVALUE%

You might also like