@Echo off
color E
set CmdCurRoot_DP=%~dp0
set CmdCurRoot_DP=%CmdCurRoot_DP:~0,-1%

set TCPrompt_Custom_Opt=NX
set TC_use_tier=4T
set TC_DATA=#TCData_DP#
set SPLM_LICENSE_SERVER=28000@LicServer.net
set UGS_LICENSE_BUNDLE=NX93100;SC12500

set NX_TP=NXxxx

if exist "C:\CustomCAE\%NX_TP%" set UGII_BASE_DIR=C:\CustomCAE\%NX_TP%
if exist "D:\CustomCAE\%NX_TP%" set UGII_BASE_DIR=D:\CustomCAE\%NX_TP%

if exist "C:\CustomCAE\TC14" set TC_ROOT=C:\CustomCAE\TC14
if exist "D:\CustomCAE\TC14" set TC_ROOT=D:\CustomCAE\TC14

set temp=E:\NXTmp
set tmp=%temp%

if not exist "%temp%" md "%temp%"
set UGII_TMP_DIR=%temp%
rem set UGII_LOAD_OPTIONS=%CmdCurRoot_DP%\NXSetting\%NX_TP%\load_options_%NX_TP%.def

cd /D "%temp%"

set toRun=start "NX" /D "%temp%" "%UGII_BASE_DIR%\NXBIN\ugraf.exe" -pim=yes %*
Echo ----------------------------------------------------------------------------
Echo Start now NX via:  "%UGII_BASE_DIR%\NXBIN\ugraf.exe" -pim=yes
%toRun%
Echo ----------------------------------------------------------------------------
Timeout /T:10
Exit

REM ---------------------------------------------------------------------
:Use4tier
 if not defined FMS_HOME if exist %tc_root%\TCCSQ set FMS_HOME=%tc_root%\TCCSQ

REM  Call PathEnvAddPath.cmd "%TC_ROOT%\tccs\bin"
 rem Call PathEnvAddPath.cmd "%FMS_HOME%\bin"
 set path=%FMS_HOME%\bin;%Path%
 set UGII_UGMGR_COMMUNICATION=HTTP
 set UGII_UGMGR_HTTP_URL=https://#CustomUGMR_HTTP_URL.NET:8001/tc#
 rem 30.08.2023 unset UGII_TCCS_ENV_NAME
 set UGII_TCCS_ENV_NAME=
goto :eof

