LISP原程序代码:有兴趣的可以一起研究一下.
(defun xiugaixiankuan()
(setq ss (ssget))
(if(/= ss nil)
(progn
(setq aw (strcat "\n 修改后的线宽:("(rtos w)")"))
(setq aw (getstring aw))
)
)
(if (/= aw "")
(setq w (atof aw))
(setq j (sslength ss)
i 0)
)
(repeat j
(setq a (ssname ss i))
(setq aa (entget a))
(setq i (+ 1 i))
(setq aname (cdr(assoc 0 aa)))
(if (= aname "LWPOLYLINE")
(command "pedit" a "w" w "")
)
(if (and (/= w 0) (= aname "LINE"))
(command "pedit" a "y" "w" w "")
)
(if (= aname "ARC")
(command "pedit" a "y" "w" w "")
)
(if (= aname "CIRCLE")
(PROGN
(setq cen(cdr(assoc 10 aa)))
(setq r1(cdr(assoc 40 aa)))
(setq d (* 2 r1))
(setq d1 (- d w ))
(setq d2 (+ d w))
(command "donut" d1 d2 cen "")
)
)
)
)
使用方法同一般的LISP程序.