(defun c:aaa() (command "_mline" "st" "3气" "pause") (while (= (logand (getvar "CmdActive") 1) 1) (command pause)) (command "explode" (entlast) "") (setq ll (cons 8 "0") yl (cons 8 "1") ysl (cons 8 "2") zkl (cons 8 "3") ;ol (cons 62 1) ) (setq ss (ssget "p")) ;获得选集 (setq n 0) (repeat (sslength ss) (setq ents (entget (ssname ss n)) pp (cdr (assoc 62 ents))) (cond ((= pp '1) (entmod (subst yl ll ents))) ((= pp '6) (entmod (subst zkl ll ents))) ((= pp '230) (entmod (subst ysl ll ents))) ) ;(entmod ents) (setq n (1+ n)) );repeat ) (defun *error* (msg) (princ "Failure at:") (princ msg) (princ)) 如上可以解决问题,谢谢各位的帮助~~ |