small fix für Erdungsbeispiel. Position aus NAME ableiten. setenv enthält die Position des REPOS

This commit is contained in:
2025-07-10 13:30:24 +02:00
parent 0679186a6e
commit 0b98271ebc
3 changed files with 7 additions and 7 deletions
+4 -2
View File
@@ -6,8 +6,8 @@ import sys
import json
import re
from ezdxf.addons import iterdxf
import re
from pathlib import Path
import ezdxf.filemanagement
from shapely.geometry import Point
@@ -68,6 +68,8 @@ def get_attributes_of_insert(dinsert, dpos):
if "NAME" in dinsert:
typ = get_type_of_name_cfg(dinsert["NAME"])
id = dinsert["NAME"]
pos = dpos["NAME"]
ld["pos"] = (pos[0], pos[1])
if "IO" in dinsert:
attr_text = dinsert["IO"]
@@ -523,7 +525,7 @@ def get_dxf_file(filepath):
"""
try:
print("reading file ..", end='')
doc = ezdxf.readfile(filepath)
doc = ezdxf.filemanagement.readfile(filepath)
print("done")
except IOError:
print(f"Not a DXF file or a generic I/O error.")