我们在添加文字过程中,经常会遇到这样一个问题,每次由于设置问题导致文字宽度不一样, 针对上述问题编写了如下代码,希望能给大家带来方便。好的话请顶一下,谢谢
(defun C:TT (/ E I O SS WID X)
(princ
"\n批量修改块属性文字的宽度系数 "
)
(if (and (setq WID (getreal "\n输入宽度系数: "))
(setq SS (ssget '((0 . "INSERT") (66 . 1))))
)
(repeat (setq I (sslength SS))
(and (setq E (ssname SS (setq I (1- I))))
(setq O (vlax-ename->vla-object E))
(mapcar
'(lambda (X)
(vla-put-scalefactor X WID)
)
(vlax-safearray->list
(vlax-variant-value (vla-getattributes O))
)
)
)
)
)
(princ)
)
|