本帖最后由 Gu_xl 于 2013-4-1 15:42 编辑
欢迎来到明经论坛!
 - (defun c:tt (/ i n ss st stl h sc)
- (initget 7)
- (setq i (getint "\n输入字体类型:"))
- (if
- (setq stl (TBLSEARCH "style" (setq st (strcat "1v" (itoa i)))))
- (progn
- (setq h (cdr (assoc 40 stl))
- sc (cdr (assoc 41 stl))
- )
- (if (equal h 0 1e-6) (setq h nil))
- (while (setq ss (ssget '((0 . "*text"))))
- (repeat (setq n (sslength ss))
- (setq obj (vlax-ename->vla-object (ssname ss (setq n (1- n)))))
- (vla-put-stylename obj st)
- (if h (vla-put-height obj h))
- (vla-put-ScaleFactor obj sc)
- )
- )
- )
- (alert (strcat st " 字体不存在"))
- )
- )
|