REM #Doc: Custom NX.Part_Utility Environ-script
REM #Doc: it is used to set customer environment before Part_Utility start's
REM #LUp: 17.01.2019/J.Fes Re.Org UGII_LOAD_OPTIONS_NE / Re.Org UGII_LOCAL_USER_DEFAULTS_NE
REM #LUp: 23.07.2023/J.Fes add JobMgr_TC_config_rule_name

if /I "%~1" equ "DEFAULTS"   call :CustomDefaults
if /I "%~1" equ "NxPartUtil" call :CustomNxPartUtil
if /I "%~1" equ "EVALUATE"   call :CustomEvaluate

if /I "%JobMgr_NxPartUtilReplica%" equ "YES" Call :CustomNxPartUtilRO
if /I "%JobMgr_NxPartUtilReplica%" neq "YES" Call :CustomNxPartUtilSO

goto :eof

rem ----------------------------------------------------------------------------
:CustomDefaults
 REM use JobMgr_use_TcServerKill [default=OFF]
 set JobMgr_use_TcServerKill=OFF
 goto :eof
rem ----------------------------------------------------------------------------
:CustomNxPartUtil
 REM set's Custom environ for NX.Part_Utility

 REM #Doc: Example Usage TC load rule --
 REM  set TC_UG_Navigator_Override_UG_Load_Option=XX
 REM  set TC_NX_Navigator_Override_NX_Load_Option=XX

 REM #Doc: Usage of ResultClassification
 if defined CHECKBOX_CALLBACK_Structure_sync set ResultClassificationCustom_DPNE=%CmdCurRoot_DP%\Resources\NxPartUpdNxSylog_ResClRulesCustom.xml

 REM #Dco: Optional set Site dir -------
 REM  set UGII_SITE_DIR=%CmdCurRoot_DP%
 REM  set UGII_USER_DIR=%CmdCurRoot_DP%

 REM disable Refile Process Monitoring via: ON/OFF
 REM set JobMgr_RfPMon_USE=OFF

 REM  #New 25.05.2017  disable  New Iray+ Ray Traced Studio Rendering
 REM Set NX_RTS_IRAY=0

 REM until TC9
 REM set FMS_HOME=%TC_ROOT%\fcc
 REM from TC9 use
 REM set FMS_HOME=%TC_ROOT%\tccs

 REM disable fccCheck
 REM set JobMgr_fccCheck_USE=false

 REM #Doc: If use TC.Pref is to read from TC_PREFERENCES_OVERLAY_FILE
 REM #Doc: Please Copy first from: .\OptionFiles\Rf_TC_PREFERENCES_OVERLAY.xml
 REM #Doc:                   to..: .\ClientScripts\Resources\Pu_TC_PREFERENCES_OVERLAY.xml
 REM #Doc: and uncommand next lines
 REM Echo ---------------------------------------------------------------------------
 REM  set TC_PREFERENCES_OVERRIDE_FROM_FILE=TRUE
 REM  set TC_PREFERENCES_OVERLAY_FILE=%CmdCurRoot_DP%\Resources\PU_TC_PREFERENCES_OVERLAY.xml
 REM Call Echo "TC.Pref.Override.from.Fi: [%TC_PREFERENCES_OVERRIDE_FROM_FILE%]"
 REM Echo ---------------------------------------------------------------------------
 REM #New 21.11.2022
 REM set BMF_BYPASS_ALL_EXTENSION_RULES=ON
 REM Echo ---------------------------------------------------------------------------
 REM #Doc: if use TC.Test.Attribut should be used please uncommand next lines
 REM Echo ---------------------------------------------------------------------------
 REM set TC_USE_TEST_ATTR_MAPPINGS=YES
 REM Call Echo "TC.Use.Test_Attr.Mapp...: [%TC_USE_TEST_ATTR_MAPPINGS%]"
 REM Echo ---------------------------------------------------------------------------

 REM -- JobMgr PartUpdate process custom option (Optional)
 rem set JobMgr_NxPartUtil_UseCBdll_NE=64_BIT_intern_12.dll
 rem if /I "%CHECKBOX_CALLBACK_Structure_sync%" equ "true" set UGII_VENDOR_DIR=%JobScriptTemplateMinus1_DP%\UGII_VENDOR_DIR
 if defined CHECKBOX_CALLBACK_Structure_sync set UGII_VENDOR_DIR=%JobScriptTemplateMinus1_DP%\UGII_VENDOR_DIR

 if /i "%JobMgr_Debug%" neq "ON" goto :JumbOverDebug
 if /I "%UGII_VENDOR_DIR%" equ "" goto :JumbOverDebug
  call Echo "---------------------------------------------------------------------------"
  call Echo "#Debug UGII_VENDOR_DIR..........: %UGII_VENDOR_DIR%"
  call Echo "#UGII_VENDOR_DIR................: Directory content"
  dir "%UGII_VENDOR_DIR%"
  pause
 :JumbOverDebug

 REM -- check use TC Config Rule name Example: Latest Working
 if defined JobMgr_TC_config_rule_name set TC_config_rule_name=%JobMgr_TC_config_rule_name%

 rem ---- Start BMF_BYPASS_ALL_EXTENSION_RULES --------------------------------
 rem 23.07.2023/J.Fes optional use BMF_BYPASS_ALL_EXTENSION_RULES
 rem #Doc: is used then unremarc next required script lines
REM  set BMF_BYPASS_ALL_EXTENSION_RULES=ON
REM  set BYPASS_RULES=ON
REM  set AM_BYPASS=ON
REM
REM  rem #Doc: 12.12.2022/J.Fes check BMF_BYPASS_ALL_EXTENSION_RULES
REM  if not "%BMF_BYPASS_ALL_EXTENSION_RULES%" equ "ON" (
REM    Call Echo "----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----  ----"
REM    Call ErrorHandel "C" "BMF_BYPASS_ALL_EXTENSION_RULES"  "chk ENV: expected value should be 'ON'"
REM    Call ErrorHandel "C" "BMF_BYPASS_ALL_EXTENSION_RULES"  "chk ENV: but value is '%BMF_BYPASS_ALL_EXTENSION_RULES%'"
REM    call ErrorHandel "C" "#toDo" "Check Scripts setting BMF_BYPASS_ALL_EXTENSION_RULES"
REM    call ErrorHandel "PS" "chk BMF_BYPASS_ALL_EXTENSION_RULES" "PartUpdateScript setting BMF_BYPASS_ALL_EXTENSION_RULES"
REM    goto :eof
REM  )
 rem ---- End BMF_BYPASS_ALL_EXTENSION_RULES ----------------------------------


 goto :eof
rem ----------------------------------------------------------------------------
:CustomEvaluate
 REM set's Custom environ for Evaluate
 REM set JobMgr_ProcessExtEvalROpt=-Custom02Log_DPNE "%temp%\JobTempSO\NX_updatePattern_results.txt"
 REM set JobMgr_ProcessExtEvalROptForPrint=ON ..
 goto :eof
rem ----------------------------------------------------------------------------
:CustomNxPartUtilSO
 REM set's Custom environ IF SO Site Objects is processed
 goto :eof
rem ----------------------------------------------------------------------------
:CustomNxPartUtilRO
 REM set's Custom environ IF RO Replica Objects is processed
 goto :eof



