small fix für Erdungsbeispiel. Position aus NAME ableiten. setenv enthält die Position des REPOS
This commit is contained in:
+4
-2
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user