@Echo off

 set path=%~dp0;%~dp0..\..\_JobMgrDefaults;%~dp0..\TcPrompt;%path%
 Call Echo "**************************************************************************"
 Call Echo "* Get TC Prompt for UG clone Export test                                 *"
 Call Echo "* Based on Version: 01.12.2020 (c)addPLM GmbH                            *"
 Call Echo "**************************************************************************"

 rem #Doc: todo set TCSite ID
 if "%~1" neq "" set TcSiteId=%~1
 if not defined TcSiteId set TcSiteId=TC11ADDPLM

 rem -- TC Prompt for Custom
 call Parse_Absolut_DP.cmd TCPrompt_Custom_DP "%~dp0..\..\_CustomDefaults\TcPrompt\"

 rem Export Root: Y:\addPLM\CustomersDataL\Viessmann\ExportRoot

 set TCPrompt_Custom_DPNE=%TCPrompt_Custom_DP%\TcPrompt_Custom.cmd
 Echo TCPrompt_Custom_DP..................: %TCPrompt_Custom_DP%
 Echo TCPrompt_Custom_DPNE................: %TCPrompt_Custom_DPNE%
 set titleTxt=TCPrompt:[%TcSiteId%][%Date% %time:~0,5%][\\%ComputerName%]
 title %titleTxt%

 if exist "%TCPrompt_Custom_DPNE%" Call "%TCPrompt_Custom_DPNE%"

 if exist "%JobMgrEchoLog_DPNE%" Dir "%JobMgrEchoLog_DPNE%"& pause& del "%JobMgrEchoLog_DPNE%"

 rem call :GetStructItem1
 rem call :GetStructItem2
 rem pause
 call :ExportItem1ViaCloneLogFile
 pause
 call :ExportItem2ViaCloneLogFile
 rem call :ExportWithoutCloneLogFile
 goto :myEnd



:ExportWithoutCloneLogFile
REM Exportiert Baugruppen ohne LogFile
 set toRun=ug_clone.exe
 set toRun=%toRun% -pim=yes
 set toRun=%toRun% -u=infodba
 set toRun=%toRun% -p=infodba
 set toRun=%toRun% -g=dba
 set toRun=%toRun% -o=export
 set toRun=%toRun% -asse="@D@DB/000093/A"
 set toRun=%toRun% -asse="@DB/000092/A"
 set toRun=%toRun% -asso="V:\JobManager\ProgEntw\Ver03\JobManagerV3\90-DATA\CustomerNameShort_SettingsGlobal\10-JobScripts\NXDP\ClientScriptsNXExportDevlop\ExportRootWithoutCloneFile"
 set toRun=%toRun% -default_d="V:\JobManager\ProgEntw\Ver03\JobManagerV3\90-DATA\CustomerNameShort_SettingsGlobal\10-JobScripts\NXDP\ClientScriptsNXExportDevlop\ExportRootWithoutCloneFile"
 set toRun=%toRun% -default_a=use_existing
 set toRun=%toRun% -copy_related_draw=yes
 set toRun=%toRun% -copy_related_cae=yes
 set toRun=%toRun% -copy_n=specification:yes
 set toRun=%toRun% -copy_n=manifestation:yes
 set toRun=%toRun% -copy_n=altrep:yes
 set toRun=%toRun% -copy_n=scenario:yes
 set toRun=%toRun% -s=exportWithoutCloneLog.clone
 set toRun=%toRun% -default_n=autotranslate

 call %toRun%

REM -default_a=exclude              BgStruk01-KBG-013/A

 goto :eof

:GetStructItem1
 REM DryRun um die Struktur zu erhalten
 set toRun=ug_clone.exe
 set toRun=%toRun% -pim=yes
 set toRun=%toRun% -u=infodba
 set toRun=%toRun% -p=infodba
 set toRun=%toRun% -g=dba
 set toRun=%toRun% -o=export
 set toRun=%toRun% -asse="@DB/000093/A"
 set toRun=%toRun% -default_a=use_existing
 set toRun=%toRun% -s=export1.clone
 set toRun=%toRun% -default_n=autotranslate
 set toRun=%toRun% -dr

 call %toRun%
REM -default_a=exclude              BgStruk01-KBG-013/A

 goto :eof

:GetStructItem2
 REM DryRun um die Struktur zu erhalten
 set toRun=ug_clone.exe
 set toRun=%toRun% -pim=yes
 set toRun=%toRun% -u=infodba
 set toRun=%toRun% -p=infodba
 set toRun=%toRun% -g=dba
 set toRun=%toRun% -o=export
 set toRun=%toRun% -asse="@DB/000092/A"
 set toRun=%toRun% -default_a=use_existing
 set toRun=%toRun% -s=export2.clone
 set toRun=%toRun% -default_n=autotranslate
 set toRun=%toRun% -dr

 call %toRun%
REM -default_a=exclude              BgStruk01-KBG-013/A

 goto :eof



:ExportItem1ViaCloneLogFile
 REM Exportiert die Daten via CloneLogFile
 set toRun=ug_clone.exe
 set toRun=%toRun% -pim=yes
 set toRun=%toRun% -u=infodba
 set toRun=%toRun% -p=infodba
 set toRun=%toRun% -g=dba
 set toRun=%toRun% -o=export
 set toRun=%toRun% -fam=lose
 set toRun=%toRun% -l=export1.clone
 set toRun=%toRun% -s=AfterExport1.clone
 set toRun=%toRun% -copy_related_draw=yes
 set toRun=%toRun% -copy_related_cae=yes
 set toRun=%toRun% -default_a=use_existing
REM set toRun=%toRun% -default_a=exclude
rem set toRun=%toRun% -default_n=user_name
REM set toRun=%toRun% -dr

 call %toRun%
REM -default_a=exclude              BgStruk01-KBG-013/A

 goto :eof


:ExportItem2ViaCloneLogFile
 REM Exportiert die Daten via CloneLogFile
 set toRun=ug_clone.exe
 set toRun=%toRun% -pim=yes
 set toRun=%toRun% -u=infodba
 set toRun=%toRun% -p=infodba
 set toRun=%toRun% -g=dba
 set toRun=%toRun% -o=export
 set toRun=%toRun% -fam=lose
 set toRun=%toRun% -l=export2.clone
 set toRun=%toRun% -s=AfterExport2.clone
 set toRun=%toRun% -copy_related_draw=yes
 set toRun=%toRun% -copy_related_cae=yes
 set toRun=%toRun% -default_a=use_existing
REM set toRun=%toRun% -default_a=exclude
rem set toRun=%toRun% -default_n=user_name
REM  set toRun=%toRun% -dr

 call %toRun%
REM -default_a=exclude              BgStruk01-KBG-013/A

 goto :eof

:myEnd

