mehrere oft verwendete Routinen in eigene utils.py eingebaut
This commit is contained in:
+1
-10
@@ -14,6 +14,7 @@ import updateconfignames as uc
|
||||
from pathlib import Path
|
||||
|
||||
from error_collector import ErrorCollector, write_json_file
|
||||
from utils import check_file_in_work
|
||||
|
||||
|
||||
@dataclass
|
||||
@@ -794,16 +795,6 @@ def _create_bom_workbook(outpath, processed_data, bezeichner_cfg):
|
||||
wb.save(bom_path)
|
||||
print(f"BOM exported to Excel-file")
|
||||
|
||||
def check_file_in_work(work_dir, filename):
|
||||
fexists = True
|
||||
if not os.path.exists(filename):
|
||||
mypath = os.path.join(work_dir, filename)
|
||||
if not os.path.exists(mypath):
|
||||
fexists = False
|
||||
else:
|
||||
mypath = filename
|
||||
return (mypath, fexists)
|
||||
|
||||
def copy_layers_into_dxf_by_filter(dxf_source: ezdxf.document.Drawing, dxf_target:ezdxf.document.Drawing):
|
||||
"""
|
||||
Kopiert bestimmte Layer (nach Filter) von einer Quell-DXF in eine Ziel-DXF.
|
||||
|
||||
Reference in New Issue
Block a user