2D/3D-Umschaltung pro GF/VF-Block (Dialog-Auswahl + Auto-Erkennung via XDATA) und Batch Alle auf 2D/3D

This commit is contained in:
2026-07-23 14:01:52 +02:00
parent 6d81b30628
commit 39a4656f38
11 changed files with 370 additions and 79 deletions
+8 -16
View File
@@ -247,22 +247,11 @@
;; ============================================================
;; TEIL 5: KS_EIN/KS_AUS EXTRAKTION
;; ============================================================
(defun ensure-block-loaded (blockname / block-datei temp-obj)
(if (not (tblsearch "BLOCK" blockname))
(progn
(setq block-datei (strcat block-pfad blockname ".dwg"))
(if (findfile block-datei)
(progn
(princ (ssg-textf "vfc-lade-block" (list blockname)))
(setq temp-obj (vla-InsertBlock modelspace
(vlax-3D-point '(0 0 0))
block-datei 1.0 1.0 1.0 0))
(vla-Delete temp-obj)
(princ (ssg-text "vfc-status-ok"))
)
(princ (ssg-textf "vfc-fehler-block-datei-fehlt" (list block-datei)))
)
)
(defun ensure-block-loaded (blockname / )
;; Zentraler Loader (aktuelle Dimension + 3D-Fallback, Neudefinition bei
;; Dimensionswechsel). Meldung nur bei Fehlschlag.
(if (not (ssg-ils-block-laden blockname))
(princ (ssg-textf "vfc-fehler-block-datei-fehlt" (list blockname)))
)
)
@@ -1157,6 +1146,9 @@
;; Aufsteigende, eindeutige ID vergeben (wie beim Kreisel), falls verfuegbar.
(if (car (atoms-family 1 '("SSG-ID-GENERATE")))
(ssg-id-generate vf-insert))
;; Dimension (2D/3D) merken -> Doppelklick-Edit erkennt sie automatisch.
(if (car (atoms-family 1 '("SSG-DIM-XDATA-SCHREIBEN")))
(ssg-dim-xdata-schreiben vf-insert (ssg-ils-dim-aktuell)))
(princ (ssg-textf "vfc-block-erstellt-eingefuegt" (list vf-bname)))
vf-insert
)