cad里加载vba小程序修改字体源代码
1个回答
展开全部
Sub ModifyTextFont()
Dim typeFace As String
Dim SavetypeFace As String
Dim Bold As Boolean
Dim Italic As Boolean
Dim charSet As Long
Dim PitchandFamily As Long
ThisDrawing.ActiveTextStyle.GetFont typeFace, Bold, Italic, charSet, PitchandFamily
typeFace = "宋体" '您要设置的字体,这里比如是宋体!!!可自行修改。。。
ThisDrawing.ActiveTextStyle.SetFont typeFace, Bold, Italic, charSet, PitchandFamily
ThisDrawing.Regen acActiveViewport
End Sub
Dim typeFace As String
Dim SavetypeFace As String
Dim Bold As Boolean
Dim Italic As Boolean
Dim charSet As Long
Dim PitchandFamily As Long
ThisDrawing.ActiveTextStyle.GetFont typeFace, Bold, Italic, charSet, PitchandFamily
typeFace = "宋体" '您要设置的字体,这里比如是宋体!!!可自行修改。。。
ThisDrawing.ActiveTextStyle.SetFont typeFace, Bold, Italic, charSet, PitchandFamily
ThisDrawing.Regen acActiveViewport
End Sub
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询