einfügen von einem eigennamen für die Blöcke

This commit is contained in:
2025-09-04 16:36:24 +02:00
parent e51e60a508
commit 43b2ff35af
2 changed files with 25 additions and 9 deletions
+8 -1
View File
@@ -179,9 +179,16 @@ def create_block_library(input_dir, output_file, config, logger=None):
error_files.append((filename, error_msg))
# Platzierung in Reihen und Spalten
# Attribut-Definition (ATTDEF) hinzufügen
blk.add_attdef(
tag="NAME",
insert=(0.2, 0.2), # Position relativ zum Blockursprung
height=0.25,
text="Default Text"
)
msp.add_blockref(name, insert=(x_offset, y_offset))
# Text mit Blocknamen über dem Block
# Werte aus Config holen (Block: [dxf2lib])
section = "dxf2lib"
text_height = get_cfg_value(section, "text_height", DEFAULTS["text_height"])