Prints in getexdraw.bat und in drawdxf.py leicht angepasst

This commit is contained in:
2025-07-04 10:44:17 +02:00
parent 80b96da6b6
commit ea7da269e1
2 changed files with 12 additions and 11 deletions
+9 -6
View File
@@ -22,11 +22,11 @@ set DXF_RES=%FILENAME%_cables.dxf
call C:\10-Develop\gitrepos\kabellaengen\bin\setenv.bat
echo --hole Positionen
echo.
echo === Fetching Positions ===
call getpositions.bat --filename %1 -s -r -w %JSON_POS% -e %ERROR_DOUBLE%
if exist "%PROJECT_WORK%\%ERROR_DOUBLE%" (
@echo -failed- given items with the same ids
@echo -failed- duplicate IDs in given layout
pause
move %PROJECT_WORK%\%ERROR_DOUBLE% %INSTALL_DIR%
goto :eof
@@ -36,20 +36,23 @@ if not exist "%PROJECT_WORK%\%JSON_POS%" (
pause
goto :eof
)
echo --erzeuge Graph mit Routing
echo.
echo === Creating Graph for Routing ===
call routing.bat --filename %JSON_POS% -w %JSON_TODRAW%
if not exist "%PROJECT_WORK%\%JSON_TODRAW%" (
@echo -failed- routing
pause
goto :eof
)
echo --zeichne Kabel in dxf Datei
call draw_dxf.bat --filename %JSON_TODRAW% --new %DXF_RES% -x %EXCEL_RES%
echo.
echo === Writing Output Files ===
call draw_dxf.bat --filename %JSON_TODRAW% --new %DXF_RES% -x %EXCEL_RES% -l
if not exist "%PROJECT_WORK%\%EXCEL_RES%" (
@echo -failed- draw_dxf
pause
goto :eof
)
echo.
mkdir %INSTALL_DIR%\%FILENAME%
move %PROJECT_WORK%\%FILENAME%_* %INSTALL_DIR%\%FILENAME%
+3 -5
View File
@@ -77,8 +77,6 @@ def add_polyline(msp, points:Polyline, dxf_attribs):
def new_dxf(plines, out_path):
""" creates a new dxf file with a polyline inside which is created by the given json file
"""
print("creating new .dxf ..")
doc = ezdxf.new('R2018', setup=True)
draw_cables(plines, doc)
draw_sensors(plines, doc)
@@ -86,7 +84,7 @@ def new_dxf(plines, out_path):
draw_racks(plines, doc)
doc.saveas(out_path)
print("done")
print("Cable-Routes exported to new dxf-file")
def modify_original_dxf(plines, originaldxf):
""" adds new layer to original .dxf-file that contains cables
@@ -371,7 +369,7 @@ def write_excel_from_json(plines: Polylines, sens2cable: dict, outpath: str, wit
_create_error_sheets(wb_main, plines)
wb_main.save(outpath)
print("Cable-Summary exported to Excel file")
print("Cable-Summary exported to Excel-file")
# 3. Optionale Stücklisten-Datei (BOM) erstellen
if with_bom:
@@ -600,7 +598,7 @@ def _create_bom_workbook(outpath, processed_data, bezeichner_cfg):
bom_path = outpath.replace("_cables.xlsx", "_BOM.xlsx")
wb.save(bom_path)
print(f"BOM saved as an excel file")
print(f"BOM exported to Excel-file")
def check_file_in_work(work_dir, filename):
fexists = True