创建宋体
(defun c:songti () ;创建左倾宋体样式(setvar "cmdecho" 0)
(if (= (Tblsearch "style" "左倾宋体") nil)
(progn
;(vl-load-com)
;(setq ThisDrawing (vla-get-activedocument (vlax-get-acad-object)))
;(Setq TextStyles (vla-get-TextStyles ThisDrawing))
; (Setq TextStyle (vla-add TextStyles "宋体"))
;(vla-SetFont TextStyle "宋体" :vlax-false :vlax-false 1 0)
(command "-style" "左倾宋体" "simsunb.ttf" 0 0.8 0 "n" "n")
(princ "\n左倾宋体样式创建完成!") ;创建左倾宋体样式
)
(progn (command "-style" "左倾宋体" "simsunb.ttf" 0 0.8 0 "n" "n")
(princ "\n左倾宋体样式已存在!")
)
)
(setvar "textstyle" "左倾宋体")
(setvar "dimtxsty" "左倾宋体") ;置前
(princ)
)
页:
[1]