本帖最后由 lucas_3333 于 2014-5-19 15:58 编辑
可是对单行与多行文字有效,对标注文字没有效果,默认标注时字高都是2.5,运行程序将标注文字高度改到1后,再次标注,还是2.5的字高
- (defun c:tt (/ hi ss)
- (fy:begin)
- (if (setq hi (getdist (strcat "\nTextSize<"
- (vl-princ-to-string (getvar "textsize"))
- ">: "
- )
- )
- )
- (setvar "textsize" hi)
- (setq hi (getvar "textsize"))
- )
- (if (ssget '((0 . "*Text,Dim*")))
- (mapcar
- '(lambda (x / typ)
- (if (wcmatch (strcase (vla-get-objectname x))
- "*DIM*"
- )
- (vlax-put x "TextHeight" hi)
- (vlax-put x "Height" hi)
- )
- )
- (fy:cset->objs)
- )
- )
- (fy:end)
- (princ)
- )
|