Files
kabellaengen/bin/getexdraw.bat
T

51 lines
1.1 KiB
Batchfile

@echo off
if [%1]==[] goto usage
for %%i in ("%~1") do (
set "FILENAME=%%~ni"
set "EXT=%%~xi"
set "DIR=%%~dpi"
)
REM echo Dateiname ohne Erweiterung: %FILENAME%
REM echo Erweiterung: %EXT%
REM echo Verzeichnis: %DIR%
call C:\kabellaengen\bin\setenv.bat
echo --hole Positionen
call getpositions.bat --filename %1 -s -r -w %FILENAME%_positions.json
if not exist "%FILENAME%_positions.json" (
@echo getpositions failed
pause
goto :eof
)
echo --erzeuge Graph mit Routing
call routing.bat --filename %FILENAME%_positions.json -w %FILENAME%_todraw.json
if not exist "%FILENAME%_todraw.json" (
@echo routing failed
pause
goto :eof
)
echo --zeichne Kabel in dxf Datei
call draw_dxf.bat --filename %FILENAME%_todraw.json --new %FILENAME%_cables.dxf -x %FILENAME%_cables.xlsx
if not exist "%FILENAME%_cables.xlsx" (
@echo draw_dxf failed
pause
goto :eof
)
mkdir %INSTALL_DIR%\%FILENAME%
move %PROJECT_WORK%\%FILENAME%_* %INSTALL_DIR%\%FILENAME%
pause
:usage
@echo Usage: %0 ^<dxfinWorkOrdner.dxf^>
exit /B 1
goto :eof