试试这个 自己根据需要修改
Tssdeng.shx,Tssdchn.shx为英文、中文字体,0.8为宽高比
如果不是你想要的 论坛搜搜一下很多源码
 - ;修改文字字体(文字样式)gzt
- (defun c:gzt (/ e txtst)
- (if (setq e (car (nentsel "\n选择需要修改字体的文字(CAD单行文字)")))
- (if (setq txtst (cdr (assoc 7 (entget e))))
- (progn
- (command "style" txtst "Tssdeng.shx,Tssdchn.shx" "" "0.8" "" "n" "n" "n") ;Tssdeng.shx,Tssdchn.shx为英文、中文字体,0.8为宽高比
- (command "regen") ;重新生成图纸,防止修改后未刷新文字
- (princ "\n文字样式已修改")
- )
- (princ "\n不是CAD单行文字,请重新选择")
- )
- )
- (princ)
- )
|