可以编辑一个程序来解决。
(defun c:tes ( / &k1 &kw1 obj xk)
(if (null vlax-dump-object) (vl-load-com) )
(if (and
(setq xk (getdist "n请输入线宽单位毫米"))
(setq xk (* xk 100))
(princ "n请选择对象")
(setq &kw1 (ssget))
)
(progn
(while (setq &k1 (ssname &kw1 0))
(setq &kw1 (ssdel &k1 &kw1))
(setq obj (vlax-ename->vla-object &k1))
(vla-put-Lineweight obj xk)
)
)
)
(princ)
);复制到记事本,以【.lsp】为后缀命名。autoLISP加载后,命令为:TES