Initialized
This commit is contained in:
commit
7b472cfb69
BIN
Daten/NX_Managed.ico
Normal file
BIN
Daten/NX_Managed.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 58 KiB |
BIN
Daten/NX_Managed.png
Normal file
BIN
Daten/NX_Managed.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 124 KiB |
347
NX_Managed.cmd
Normal file
347
NX_Managed.cmd
Normal file
@ -0,0 +1,347 @@
|
|||||||
|
@echo off
|
||||||
|
color f0
|
||||||
|
set title=NX Managed
|
||||||
|
title %title%
|
||||||
|
|
||||||
|
::by IT-BA-PE / Dominik Prinz
|
||||||
|
::Created: 21.05.2021
|
||||||
|
::Last Updated: 08.09.2021
|
||||||
|
::
|
||||||
|
::#### CHANGELOG ####
|
||||||
|
:: - Added support for NX 1980
|
||||||
|
:: - Removed support for NX 1926
|
||||||
|
::
|
||||||
|
::#### DESCRIPTION ####
|
||||||
|
::Modified Version of the NX_Native.cmd Script to start NX in managed mode(with Teamcenter Connection)
|
||||||
|
::Lets the user select which NX Version to start(Currently supports NX12, NX1953, NX1980 and Beta Versions).
|
||||||
|
::Also displays the exact NX Versions using env_print.exe
|
||||||
|
::
|
||||||
|
::Install-Paths, License-Server, language and ENV files can be set below, under "USER DEFINED VARIABLES".
|
||||||
|
::
|
||||||
|
::#### COMMANDS ####
|
||||||
|
::[1-4]: Starts the respective NX Version. You can also enter the Version name(12, 1953, 1980, beta)
|
||||||
|
:: -[1] The current productive NX Version
|
||||||
|
:: -[2-3] NX Versions that are currently being tested or old Versions
|
||||||
|
:: -[4] The current Beta Version of NX, has to be enabled by setting "enable_beta" to "1" under "USER DEFINED VARIABLES"
|
||||||
|
::
|
||||||
|
::noenv: Starts NX without loading an ENV file. The default ENV file located in the Installation foler will be used.
|
||||||
|
::
|
||||||
|
::cam: Starts NX loading the CAM ENV file. This can be set under "USER DEFINED VARIABLES".
|
||||||
|
::
|
||||||
|
::#### START PARAMETERS ####
|
||||||
|
:: -The desired NX Version can also be passed onto the Script by using the repsective number or Version name. This will directly start that NX Version.
|
||||||
|
:: -"noenv" or "cam" can also be passed onto the script, has the same effect as the respective commands above.
|
||||||
|
|
||||||
|
|
||||||
|
::##########START USER DEFINED VARIABLES##########
|
||||||
|
::set NX Install paths here:
|
||||||
|
set nx12installpath=C:\CAD\NX12
|
||||||
|
set nx1980installpath=C:\CAD\NX1980
|
||||||
|
set nx1953installpath=C:\CAD\NX1953
|
||||||
|
|
||||||
|
::leave below settings empty for default license server and ENV-file
|
||||||
|
::set License Server here:
|
||||||
|
set licenseserver=
|
||||||
|
|
||||||
|
::set NX Language here:
|
||||||
|
set UGII_LANG=german
|
||||||
|
|
||||||
|
::set NX configurtaion directories here:
|
||||||
|
set nx12cfgdir=M:\UG\NX12_NXTC
|
||||||
|
set nx1980cfgdir=
|
||||||
|
set nx1953cfgdir=
|
||||||
|
|
||||||
|
::set ENV file names(ONLY the file itself!):
|
||||||
|
set nx12envfile=
|
||||||
|
set nx1980envfile=
|
||||||
|
set nx1953envfile=
|
||||||
|
set camenvfile=ugii_env_cam_test.dat
|
||||||
|
|
||||||
|
::set NX Beta variables - for starting Beta Versions of NX
|
||||||
|
set enable_beta=0
|
||||||
|
set nxbetainstallpath=C:\CAD\NX20xx
|
||||||
|
set betalicenseserver=
|
||||||
|
::FULL ENV PATH REQUIRED!
|
||||||
|
set nxbetaenvfile=M:\UG\NX1953_NXTC\global\00_DEFAULTS\UGII\ugii_env.dat
|
||||||
|
::##########END USER DEFINED VARIABLES##########
|
||||||
|
|
||||||
|
::sets Variables required for SSO
|
||||||
|
set ENGEL_TC_VER=12
|
||||||
|
set TC_DIR=C:\CAD\TC%ENGEL_TC_VER%
|
||||||
|
set TCCS_CONFIG_HOME=%TC_DIR%\tccs\cfg
|
||||||
|
set TCCS_CONFIG=Teamcenter
|
||||||
|
set FMS_HOME=%TC_DIR%\tccs
|
||||||
|
|
||||||
|
::sets default ENV-file and license server
|
||||||
|
set defaultlicenseserver=28000@EMSCADLIC.engel.int
|
||||||
|
set defaultcfgdir=M:\UG\NX1953_NXTC
|
||||||
|
set defaultenvfile=ugii_env.dat
|
||||||
|
|
||||||
|
::sets Variables
|
||||||
|
set nx12ver=NOT INSTALLED
|
||||||
|
set nx1953ver=NOT INSTALLED
|
||||||
|
set nx1980ver=NOT INSTALLED
|
||||||
|
set nxbetaver=NOT INSTALLED
|
||||||
|
set noenv=0
|
||||||
|
set cam=0
|
||||||
|
|
||||||
|
::checks startparameters
|
||||||
|
if "%1"=="1" call :setchoice %1
|
||||||
|
if "%1"=="2" call :setchoice %1
|
||||||
|
if "%1"=="3" call :setchoice %1
|
||||||
|
if "%1"=="4" call :setchoice %1
|
||||||
|
if "%1"=="12" call :setchoice %1
|
||||||
|
if "%1"=="1953" call :setchoice %1
|
||||||
|
if "%1"=="1980" call :setchoice %1
|
||||||
|
if "%1"=="beta" call :setchoice %1
|
||||||
|
if "%1"=="noenv" call :setnoenv
|
||||||
|
if "%1"=="cam" call :setcam
|
||||||
|
if "%2"=="noenv" call :setnoenv
|
||||||
|
if "%2"=="cam" call :setcam
|
||||||
|
goto versionchecker
|
||||||
|
|
||||||
|
::checks which NX Versions are installed and their Versions
|
||||||
|
:versionchecker
|
||||||
|
echo Getting NX Versions...
|
||||||
|
if exist %nx12installpath%\NXBIN\ugraf.exe (
|
||||||
|
%nx12installpath%\NXBIN\env_print.exe -n>"%temp%\nx12ver.txt"
|
||||||
|
set /p nx12ver=<"%temp%\nx12ver.txt"
|
||||||
|
)
|
||||||
|
set nx12ver=%nx12ver:NX =%
|
||||||
|
|
||||||
|
if exist %nx1953installpath%\NXBIN\ugraf.exe (
|
||||||
|
%nx1953installpath%\NXBIN\env_print.exe -n>"%temp%\nx1953ver.txt"
|
||||||
|
set /p nx1953ver=<"%temp%\nx1953ver.txt"
|
||||||
|
)
|
||||||
|
set nx1953ver=%nx1953ver:NX =%
|
||||||
|
|
||||||
|
if exist %nx1980installpath%\NXBIN\ugraf.exe (
|
||||||
|
%nx1980installpath%\NXBIN\env_print.exe -n>"%temp%\nx1980ver.txt"
|
||||||
|
set /p nx1980ver=<"%temp%\nx1980ver.txt"
|
||||||
|
)
|
||||||
|
set nx1980ver=%nx1980ver:NX =%
|
||||||
|
|
||||||
|
if exist %nxbetainstallpath%\NXBIN\ugraf.exe (
|
||||||
|
%nxbetainstallpath%\NXBIN\env_print.exe -n>"%temp%\nxbetaver.txt"
|
||||||
|
set /p nxbetaver=<"%temp%\nxbetaver.txt"
|
||||||
|
)
|
||||||
|
set nxbetaver=%nxbetaver:NX =%
|
||||||
|
|
||||||
|
::asks the user for the desired NX version
|
||||||
|
:versionselector
|
||||||
|
cls
|
||||||
|
if "%choice%"=="" (
|
||||||
|
mode con cols=37 lines=11
|
||||||
|
if "%enable_beta%"=="1" (
|
||||||
|
mode con cols=37 lines=12
|
||||||
|
)
|
||||||
|
echo.
|
||||||
|
echo Select Version:
|
||||||
|
echo ===============================
|
||||||
|
echo [1] NX1953 %nx1953ver%
|
||||||
|
echo [2] NX1980 %nx1980ver%
|
||||||
|
echo [3] NX12 %nx12ver%
|
||||||
|
if "%enable_beta%"=="1" (
|
||||||
|
echo [4] NX BETA %nxbetaver%
|
||||||
|
)
|
||||||
|
echo.
|
||||||
|
echo Language: %UGII_LANG%
|
||||||
|
echo ===============================
|
||||||
|
set /p choice=
|
||||||
|
)
|
||||||
|
if "%choice%"=="1" goto nx1953
|
||||||
|
if "%choice%"=="1953" goto nx1953
|
||||||
|
if "%choice%"=="2" goto nx1980
|
||||||
|
if "%choice%"=="1980" goto nx1980
|
||||||
|
if "%choice%"=="3" goto nx12
|
||||||
|
if "%choice%"=="12" goto nx12
|
||||||
|
if "%choice%"=="4" goto nxbeta
|
||||||
|
if "%choice%"=="beta" goto nxbeta
|
||||||
|
if "%choice%"=="noenv" goto switch_env
|
||||||
|
if "%choice%"=="cam" goto switch_cam
|
||||||
|
if "%choice%"=="lang" goto language
|
||||||
|
if "%choice%"=="language" goto language
|
||||||
|
if "%choice%"=="exit" goto end
|
||||||
|
echo.
|
||||||
|
echo invalid input!
|
||||||
|
set choice=
|
||||||
|
pause
|
||||||
|
goto versionselector
|
||||||
|
|
||||||
|
::enables/disables loading of an ENV file
|
||||||
|
:switch_env
|
||||||
|
if "%noenv%"=="0" (
|
||||||
|
call :setnoenv
|
||||||
|
) else (
|
||||||
|
set noenv=0
|
||||||
|
title %title%
|
||||||
|
)
|
||||||
|
set choice=
|
||||||
|
goto versionselector
|
||||||
|
|
||||||
|
::enables/disables loading of the CAM ENV file
|
||||||
|
:switch_cam
|
||||||
|
if "%cam%"=="0" (
|
||||||
|
call :setcam
|
||||||
|
) else (
|
||||||
|
set cam=0
|
||||||
|
title %title%
|
||||||
|
)
|
||||||
|
set choice=
|
||||||
|
goto versionselector
|
||||||
|
|
||||||
|
::lets the user change the language
|
||||||
|
:language
|
||||||
|
cls
|
||||||
|
echo.
|
||||||
|
echo Current Language: %UGII_LANG%
|
||||||
|
echo.
|
||||||
|
echo Select Language:
|
||||||
|
echo ===============================
|
||||||
|
echo [1] German
|
||||||
|
echo [2] English
|
||||||
|
echo ===============================
|
||||||
|
set /p choice=
|
||||||
|
if "%choice%"=="1" set UGII_LANG=german
|
||||||
|
if "%choice%"=="2" set UGII_LANG=english
|
||||||
|
set choice=
|
||||||
|
goto versionselector
|
||||||
|
|
||||||
|
::sets some variables required for the launch of NX12
|
||||||
|
:nx12
|
||||||
|
if "%nx12ver%"=="NOT INSTALLED" (
|
||||||
|
set nxver=NOT INSTALLED
|
||||||
|
goto startnx
|
||||||
|
)
|
||||||
|
set nxpath=%nx12installpath%
|
||||||
|
set nxver=NX12
|
||||||
|
set nxverfull=%nx12ver%
|
||||||
|
if "%nx12envfile%"=="" set nx12envfile=%defaultenvfile%
|
||||||
|
if "%nx12cfgdir%"=="" set nx12cfgdir=%defaultcfgdir%
|
||||||
|
set nxenvpath=%nx12cfgdir%\global\00_DEFAULTS\UGII
|
||||||
|
set nxenvfile=%nx12envfile%
|
||||||
|
goto startnx
|
||||||
|
|
||||||
|
::sets some variables required for the launch of NX1953
|
||||||
|
:nx1953
|
||||||
|
if "%nx1953ver%"=="NOT INSTALLED" (
|
||||||
|
set nxver=NOT INSTALLED
|
||||||
|
goto startnx
|
||||||
|
)
|
||||||
|
set nxpath=%nx1953installpath%
|
||||||
|
set nxver=NX1953
|
||||||
|
set nxverfull=%nx1953ver%
|
||||||
|
if "%nx1953envfile%"=="" set nx1953envfile=%defaultenvfile%
|
||||||
|
if "%nx1953cfgdir%"=="" set nx1953cfgdir=%defaultcfgdir%
|
||||||
|
set nxenvpath=%nx1953cfgdir%\global\00_DEFAULTS\UGII
|
||||||
|
set nxenvfile=%nx1953envfile%
|
||||||
|
goto startnx
|
||||||
|
|
||||||
|
::sets some variables required for the launch of NX1980
|
||||||
|
:nx1980
|
||||||
|
if "%nx1980ver%"=="NOT INSTALLED" (
|
||||||
|
set nxver=NOT INSTALLED
|
||||||
|
goto startnx
|
||||||
|
)
|
||||||
|
set nxpath=%nx1980installpath%
|
||||||
|
set nxver=NX1980
|
||||||
|
set nxverfull=%nx1980ver%
|
||||||
|
if "%nx1980envfile%"=="" set nx1980envfile=%defaultenvfile%
|
||||||
|
if "%nx1980cfgdir%"=="" set nx1980cfgdir=%defaultcfgdir%
|
||||||
|
set nxenvpath=%nx1980cfgdir%\global\00_DEFAULTS\UGII
|
||||||
|
set nxenvfile=%nx1980envfile%
|
||||||
|
goto startnx
|
||||||
|
|
||||||
|
::sets some variables required for the launch of NX Beta
|
||||||
|
:nxbeta
|
||||||
|
if not "%enable_beta%"=="1" (
|
||||||
|
cls
|
||||||
|
echo.
|
||||||
|
echo NX BETA is not enabled!
|
||||||
|
echo.
|
||||||
|
>nul timeout /t 5 /nobreak
|
||||||
|
goto end
|
||||||
|
)
|
||||||
|
if "%nxbetaver%"=="NOT INSTALLED" (
|
||||||
|
set nxver=NOT INSTALLED
|
||||||
|
goto startnx
|
||||||
|
)
|
||||||
|
set nxpath=%nxbetainstallpath%
|
||||||
|
set nxver=NX BETA
|
||||||
|
set nxverfull=%nxbetaver%
|
||||||
|
set SPLM_LICENSE_SERVER=%betalicenseserver%
|
||||||
|
|
||||||
|
if "%nxbetaenvfile%"=="" (
|
||||||
|
set UGII_ENV_FILE=
|
||||||
|
set noenv=1 ) else (
|
||||||
|
set UGII_ENV_FILE=%nxbetaenvfile%
|
||||||
|
)
|
||||||
|
goto startnx
|
||||||
|
|
||||||
|
::starts NX
|
||||||
|
:startnx
|
||||||
|
if "%nxver%"=="NOT INSTALLED" (
|
||||||
|
cls
|
||||||
|
echo.
|
||||||
|
echo The selected NX Version is not
|
||||||
|
echo installed.
|
||||||
|
>nul timeout /t 5 /nobreak
|
||||||
|
goto end
|
||||||
|
)
|
||||||
|
if not "%nxver%"=="NX BETA" (
|
||||||
|
if "%licenseserver%"=="" (
|
||||||
|
set set SPLM_LICENSE_SERVER=%defaultlicenseserver% ) else (
|
||||||
|
set SPLM_LICENSE_SERVER=%licenseserver%
|
||||||
|
)
|
||||||
|
if "%cam%"=="1" (
|
||||||
|
set UGII_ENV_FILE=%nxenvpath%\%camenvfile% ) else (
|
||||||
|
set UGII_ENV_FILE=%nxenvpath%\%nxenvfile% )
|
||||||
|
)
|
||||||
|
|
||||||
|
if "%UGII_LANG%"=="german" (
|
||||||
|
set nl=de_AT ) else (
|
||||||
|
set nl=en_US )
|
||||||
|
|
||||||
|
if "%noenv%"=="1" (
|
||||||
|
set UGII_ENV_FILE=
|
||||||
|
)
|
||||||
|
cls
|
||||||
|
mode con cols=82 lines=8
|
||||||
|
echo.
|
||||||
|
set UGII_BASE_DIR=%nxpath%
|
||||||
|
if "%noenv%"=="0" (
|
||||||
|
echo UGII_ENV_FILE: %UGII_ENV_FILE%
|
||||||
|
) else (
|
||||||
|
echo UGII_ENV_FILE: NONE )
|
||||||
|
echo UGII_BASE_DIR: %UGII_BASE_DIR%
|
||||||
|
echo Licenseserver: %SPLM_LICENSE_SERVER%
|
||||||
|
echo Language: %UGII_LANG%
|
||||||
|
echo.
|
||||||
|
echo Starting %nxver% (%nxverfull%)...
|
||||||
|
start "" "%nxpath%\NXBIN\ugraf.exe" -pim=yes -nl=%nl% -http_url=http://etc.engel.int:8080/tc/aiws/aiwebservice -soa_url=http://etc.engel.int:8080/tc -sso_login_url=http://etc.engel.int:8100/LoginService/tccs -sso_app_id=TeamcenterPROD -tccs_env_name="Teamcenter 12 (SSO)" -nx 4-tier
|
||||||
|
echo %nxverfull%>C:\temp\nxver.txt
|
||||||
|
>nul timeout /t 10 /nobreak
|
||||||
|
goto end
|
||||||
|
|
||||||
|
|
||||||
|
::some subroutines
|
||||||
|
:setchoice
|
||||||
|
set choice=%1
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
:setnoenv
|
||||||
|
title %title% - NO ENV
|
||||||
|
set noenv=1
|
||||||
|
set cam=0
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
:setcam
|
||||||
|
title %title% - CAM ENV
|
||||||
|
set cam=1
|
||||||
|
set noenv=0
|
||||||
|
goto :eof
|
||||||
|
|
||||||
|
|
||||||
|
::EOF
|
||||||
|
:end
|
||||||
|
exit
|
||||||
Loading…
Reference in New Issue
Block a user