;原来的程序 (defun c:cir() (setq ent (ssget "x" '(0 . "circle"))) ;(1) (setq n (sslength ent) i 0) (setq a (getreal "\nscale factor:")) (while (< i n) (setq ss (ssname ent i)) (setq pt (assoc 10 (entget ss)))) ;(2) (command "scale" "ss" "" "pt" "r" "a" ) ;(3) (setq i (1+ i)) ) )
;对原程序(1)(2)(3)行作了改动 (defun c:cir() (setq ent (ssget "x" '((0 . "circle")))) (setq n (sslength ent) i 0) (setq a (getreal "\nscale factor:")) (while (< i n) (setq ss (ssname ent i)) (setq pt (cdr(assoc 10 (entget ss)))) (command "scale" ss "" pt a) (setq i (1+ i)) ) ) ;已测试通过,供参考