rem
set PATH=%UGII_BASE_DIR%\ugii;%PATH%
rem
rem MOTION PRODUCT
rem
rem ADAMS requires the following three variables to be set:
rem
set LM_LICENSE_FILE=%UGII_BASE_DIR%\mech\license.dat
set MDI_AVIEW_MESSAGES=%UGII_BASE_DIR%\mech\aview.msg
rem
rem Check UGFLEXlm License service.
"%UGII_BASE_DIR%\ugflexlm\lmutil" lmstat -c %UGII_LICENSE_FILE% > NUL
if ERRORLEVEL 0 goto run_ug_validate
if ERRORLEVEL -13 goto server_error
rem
:run_ug_validate
rem Run ug_validate.
rem
set UGII_LANGUAGE=%UGII_BASE_DIR%\chinese
"%UGII_BASE_DIR%\ugii\ug_validate" > NUL
if ERRORLEVEL 1 goto error_exit
start "Title" "%UGII_ROOT_DIR%\"ugraf.exe %*
if ERRORLEVEL 1 goto error_exit
goto normal_exit
:server_error
echo ERROR: Unable to start Unigraphics. The License server(s) defined in
echo the UGII_LICENSE_FILE environment variable did NOT respond.
echo Current Setting: %UGII_LICENSE_FILE%
echo Check: UGII_LICENSE_FILE and that server(s)
echo are running.
echo To check the server(s) use:
echo disk:\ugs170\ugflexlm\lmutil lmstat -c %%UGII_LICENSE_FILE%%
rem
:error_exit
pause
:normal_exit
endlocal
@echo on