- 程序不能执行第一种判断,不知那里出错了,请各位帮我修正,谢谢!
-
- (defun c:dx ()
- (INITGET "L C") ;设定输入范围
- (setq sz (getkword "\n选择参照方式[线型(L)、颜色(C)]:"))
- (setq sz (strcase sz))
- (if (setq sz L)
- (progn
- (setq en (entsel "\n选择线型参照体:"))
- (WHILE (= en nil)
- (setq en (entsel "\n选择线型参照体:"))
- )
- (setq endata (entget (car en)))
- (setq cj (cdr (assoc 6 endata)))
- (setq ss (ssget (list (cons 6 cj))))
- (WHILE (= ss nil)
- (setq ss (ssget (list (cons 6 cj))))
- )
- (command "erase" ss "")
- )
- ;;;========================================================
- (progn
- (setq en (entsel "\n选择颜色参照体:"))
- (WHILE (= en nil)
- (setq en (entsel "\n选择颜色参照体:"))
- )
- (setq endata (entget (car en)))
- (setq cj (cdr (assoc 62 endata)))
- (setq ss (ssget (list (cons 62 cj))))
- (WHILE (= ss nil)
- (setq ss (ssget (list (cons 62 cj))))
- )
- (command "erase" ss "")
- )
- )
- )
|