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
;; 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:
(setq i 0);counter to zero
(setq imax 1);while variable
@@ -30,6 +30,9 @@
(prompt "\nDxf group code: (leave empty for all) ")
(setq groupCode (getint))
(print groupCode)
(initget 1 "Yes No")
(setq sube (getkword "List sub entities? [Yes/No]"))
(while imax
(print )
@@ -63,7 +66,7 @@
(setq en2(entnext (ssname ss i))) ;- Get the next sub-entity
(if en2
(if (and en2 (= sube "Yes"))
(progn
(print )
(princ "Sub entities: ")
@@ -82,8 +85,12 @@
)
(progn
(print )
(princ "No sub entities")
(if (= sube "Yes")
(progn
(print )
(princ "No sub entities")
)
)
)
)
)