(defun dxf (x ename /)
(strcase (cdr (assoc x (entget ename))) T)
)
(defun c:nl (/ x z msg)
(setq x (nentsel))
(if x
(progn
(if (/= (nth 3 x) nil)
(progn
(setq msg (strcat "[ "
(dxf 0 (car x))
" ] --> LAYER: "
(dxf 8 (car x))
"\n"
"\n"
)
msg (foreach z (nth 3 x)
(setq msg (strcat "[ "
(if (= (dxf 0 z) "insert")
(dxf 2 z)
(dxf 0 z)
)
" ] --> LAYER: "
(dxf 8 z)
"\n"
"\n"
msg
)
)
)
)
)
(setq msg (strcat "[ "
(dxf 0 (car x))
" ] --> LAYER: "
(dxf 8 (car x))
)
)
)
(alert msg)
(princ msg)
(princ)
)
)
(princ)
)

Advertisements