点什么删什么层
请高手指点!
;启动命令 DE
(defun c:de() (command"layer""on""*""") (prompt" ******209制作****** 点取要删除的一个图层:") (setq a (ssget)) (if (not a)(command"layer""u""*""""") (progn (command"layer""lo""*""") (setq mumer 0) (setq tysm (sslength a)) (repeat tysm (setq ty1 (ssname a mumer)) (setq sj1 (entget ty1)) (setq tc1 (cdr(assoc 8 sj1))) (command"layer""u"tc1"") (command"erase""all""") (command"layer""u""*""") (setq mumer (1+ mumer)) ) ) ) (command"purge""all" "" "no") (princ) ) |