我想在CAD里输出不同字体的文本,但我如果加入下面的语句时所有文本的字体全变成宋体了,这并不是我想要的结果.
Thisdrawing.ActiveTextStyle.SetFont "宋体", False, False, 60, 0 Set textObj = Thisdrawing.ModelSpace.AddText("正线公里标", InsertionPoint, 2.5)
如果我象下面这样用的话"正线公里标"这几个字又显示不出来,全是?.请问大家这是怎么回事啊?怎样才能分别对不同的文本设置其字体啊?
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 SavetypeFace = typeFace Thisdrawing.ActiveTextStyle.SetFont "宋体", False, False, 60, 0 Thisdrawing.Regen acActiveViewport Set textObj = Thisdrawing.ModelSpace.AddText("正线公里标", InsertionPoint, 2.5) Thisdrawing.ActiveTextStyle.SetFont SavetypeFace, False, False, 60, 0 Thisdrawing.Regen acActiveViewport |