好好理解下面斑竹的程序 相信可以解决你的问题
(Defun c:at(/ ename LOOP elist) (setq ename (entnext (car (entsel)))) (setq LOOP T) (While (and ename LOOP) (setq elist (entget ename)) (if (= (cdr (assoc 0 elist)) "ATTRIB") (progn (princ (cdr (assoc 2 elist))) (princ " ----> ") (princ (cdr (assoc 1 elist))) (princ "\n") ) (setq LOOP nil) ) (setq ename (EntNext ename)) ) (princ) )
|