added option to show sub elements in dxfval

This commit is contained in:
2019-09-18 21:26:19 +02:00
parent 65a0b8478e
commit 437c614344

View File

@@ -6,7 +6,7 @@
;; gyetpet@gmail.com ;; gyetpet@gmail.com
;; gyetvai-peter.hu ;; gyetvai-peter.hu
(defun C:dxfval (/ i imax il j jmax jl x ss currElem code groupCode en2 enlist2 ) (defun C:dxfval (/ i imax il j jmax jl x ss currElem code groupCode sube en2 enlist2 )
;variables: ;variables:
(setq i 0);counter to zero (setq i 0);counter to zero
(setq imax 1);while variable (setq imax 1);while variable
@@ -31,6 +31,9 @@
(setq groupCode (getint)) (setq groupCode (getint))
(print groupCode) (print groupCode)
(initget 1 "Yes No")
(setq sube (getkword "List sub entities? [Yes/No]"))
(while imax (while imax
(print ) (print )
(print ) (print )
@@ -63,7 +66,7 @@
(setq en2(entnext (ssname ss i))) ;- Get the next sub-entity (setq en2(entnext (ssname ss i))) ;- Get the next sub-entity
(if en2 (if (and en2 (= sube "Yes"))
(progn (progn
(print ) (print )
(princ "Sub entities: ") (princ "Sub entities: ")
@@ -82,8 +85,12 @@
) )
(progn (progn
(print ) (if (= sube "Yes")
(princ "No sub entities") (progn
(print )
(princ "No sub entities")
)
)
) )
) )
) )