You are on page 1of 3

@echo off

REM # =============================================================================
#
REM SCRIPT TO RUN NXTRANSDIRECT 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:\TC9
REM Check if TC_DATA is valid.
set TC_ROOT=D:\PLM\TC11\tc_root
set TC_DATA=D:\PLM\TC11\tc_data

set FMS_HOME=CHANGE_ME
set TC_JRE_HOME=CHANGE_ME

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 NX is installed
REM Example set UGII_BASE_DIR=D:\Progra~1\Siemens\NX
REM set SPLM_LICENSE_SERVER To UG license
REM Example set SPLM_LICENSE_SERVER=2100@sol001
REM
REM set UGII_BASE_DIR=
REM set SPLM_LICENSE_SERVER=

setlocal

@set PARAM1=%1

if x%PARAM1% == x goto help


if %1==-help goto help

goto setenv

:help
echo Usage:
echo Using the login credentials:
echo nxtransdirect.bat -u=user -p= password or -pf=password-file -g=group -
inputFile="Full path to input xml"
echo -p Specifies the password. If used without a value, the system assumes a
null value. This argument is mutually exclusive with the pf argument.
echo -pf Specifies the password file. The file must be a single-line ASCII file
containing the password in clear text.
echo .
echo or if you need to login as module user:
echo nxtransdirect.bat -autologin=true -inputFile ="Full path to input xml"
echo .
echo it also supports following additional optional arguments
echo -storeInSourceVolume=false is defaulted to false when not passed in,
echo if set to true will store translated dataset in same
echo volume as source dataset.
echo .
echo -updateExistingVisData=false is defaulted to false when not passed in ,
echo if set to true will translate even if translated data
echo already exists and is of later date compared to
source.
echo .
echo -changeOwnerToCad=false is defaulted to false when not passed in,
echo if set to true will set translated dataset owner same
echo as that of source dataset.
echo .
echo example usage
echo nxtransdirect.bat -autologin=true -inputFile ="Full path to input xml" -
storeInSourceVolume=true -updateExistingVisData=true -changeOwnerToCad=true
echo .
echo NOTE: This translator is only available in NX8.5 and cannot be configured
prior to that.

goto :EOF

:setenv

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

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

set UGII_ROOT_DIR=%UGII_BASE_DIR%\UGII
set UGII_CONFIG_DIR=%UGII_BASE_DIR%\PVTRANS

:setenv

set OLDPATH=%PATH%

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

set PATH=%UGII_ROOT_DIR%;%PATH%;

"%UGII_BASE_DIR%\ugmanager\run_nxtrans.bat" -config="%UGII_CONFIG_DIR%" "-pim=yes"


%*
goto done

:done
set EXITVALUE=%ERRORLEVEL%

set PATH=%OLDPATH%

:end

endlocal
@echo on

EXIT %EXITVALUE%

You might also like