本帖最后由 ssyfeng 于 2018-11-14 11:37 编辑
看看是不是这样:
- (defun asdf ( / obj )
- (setq obj (vla-add (vla-get-TextStyles (vla-get-ActiveDocument (vlax-get-acad-object))) "asdf"))
- (vla-setFont obj "宋体" :vlax-false :vlax-false 134 2)
- (vla-put-Height obj 8) ;;;设置字高
- (vla-put-Width obj 0.75) ;;设置宽度因子
- (vla-put-ActiveTextStyle (vla-get-ActiveDocument (vlax-get-acad-object)) obj) ;;设置为当前字体样式
- )
|