lisp dbg library um ein paar Einträge gefixt. dbg lib wird geladen und initalisiert. .dbg file erscheint im logs Ordner. Fix zu den verlorenden Attributen des Kreisels

This commit is contained in:
2026-05-26 13:43:43 +02:00
parent 552da72011
commit 590e197557
4 changed files with 123 additions and 59 deletions
+41 -11
View File
@@ -295,7 +295,22 @@
;; WICHTIG: Vor dem Zeichnen den aktuellen letzten Entity merken
;; Aber wenn die Zeichnung leer ist, setzen wir lastEnt auf nil
(if (setq lastEnt (entlast))
(princ) ;; Letzte Entity existiert
(progn
;; Falls lastEnt ein INSERT mit Attributen ist, muessen wir
;; bis zum SEQEND navigieren, da entnext sonst in die
;; ATTRIB-Sub-Entities hineinlaeuft
(if (and (= (cdr (assoc 0 (entget lastEnt))) "INSERT")
(= (cdr (assoc 66 (entget lastEnt))) 1))
(progn
(setq lastEnt (entnext lastEnt))
(while (and lastEnt
(/= (cdr (assoc 0 (entget lastEnt))) "SEQEND"))
(setq lastEnt (entnext lastEnt))
)
;; lastEnt ist jetzt SEQEND - entnext darauf gibt das naechste Top-Level-Entity
)
)
)
(setq lastEnt nil) ;; Zeichnung ist leer
)
@@ -955,20 +970,14 @@
;; --------------------------------------------
;; ILS_Eckrad: Einzelnen AN8-Block einfuegen
;;
;; Fuegt den Block AN8.dwg an einem gewaehlten Punkt
;; mit waehlbarer Rotation ein (Eckrad / Umlenkrad).
;; ILS_Eckrad: Befehl - fragt Eingaben ab und fuegt Eckrad ein
;; --------------------------------------------
(defun c:ILS_Eckrad ( / pt rotStr rotation)
(ssg-start "Eckrad einfuegen" '(("ATTREQ") ("ATTDIA")))
(setvar "ATTREQ" 0)
(setvar "ATTDIA" 0)
(dbgf "c:ILS_Eckrad")
;; 1. Einfuegepunkt
(setq pt (getpoint "\nEinfuegepunkt Eckrad: "))
(if (null pt) (progn (ssg-end) (exit)))
(if (null pt) (progn (dbgreturn nil) (exit)))
;; 2. Rotation
(setq rotStr (getstring "\nRotation in Grad <0>: "))
@@ -977,13 +986,34 @@
(setq rotation (atof rotStr))
)
;; 3. AN8 einfuegen
;; 3. Einfuegen
(ils-eckrad-insert pt rotation)
(dbgreturn nil)
)
;; --------------------------------------------
;; ils-eckrad-insert: Fuegt AN8-Block an Punkt mit Rotation ein
;; Parameter:
;; pt - Einfuegepunkt (Liste x y [z])
;; rotation - Drehwinkel in Grad
;; --------------------------------------------
(defun ils-eckrad-insert (pt rotation)
(dbgf "ils-eckrad-insert")
(dbg 'pt)
(dbg 'rotation)
(ssg-start "Eckrad einfuegen" '(("ATTREQ") ("ATTDIA")))
(setvar "ATTREQ" 0)
(setvar "ATTDIA" 0)
(dbgp (strcat "INSERT Block: " *block-path* "AN8.dwg"))
(command "_.INSERT" (strcat *block-path* "AN8.dwg") pt 1 1 rotation)
(princ (strcat "\nEckrad eingefuegt bei "
(rtos (car pt) 2 1) "," (rtos (cadr pt) 2 1)
" Rotation=" (rtos rotation 2 1)))
(ssg-end)
(dbgreturn nil)
)
;; NEU: KreiselLabelSetup - Hier einfügen!