文字识别不出来该怎么解决?
我在给CAD图加标注时,字体总是识别不出来(CAD图中显示为?),请问这是怎么回事,该怎么解决?Dim Draw_Length_T As AcadText
Set Draw_Length_T = ThisDrawing.ModelSpace.AddText("基准线", FZ_Point, 5) 字体问题吧。
换个字体应该就好了。 '设置字型
Function SetTtfTextStyle(TextStyleName As String, TTFName As String) As AcadTextStyle
On Error Resume Next
Set SetTtfTextStyle = ThisDrawing.TextStyles.Add(TextStyleName)
SetTtfTextStyle.SetFont TTFName, False, False, 0, 0
End Function
' 写文字
Function AddTextWithStyle(TextString As String, InsertionPoint As Variant, Height As Double, Alignment As Integer, TextStyleName As String)
Dim Text As AcadText
Text = ThisDrawing.ModelSpace.AddText(TextString, InsertionPoint, Height)
Text.Alignment = Alignment
Text.TextAlignmentPoint = InsertionPoint
Text.StyleName = TextStyleName
End Function 好的,搞定了 <EM>function</EM> SetTtfTextStyle(TextStyleName As String, TTFName As String) As AcadTextStyle<BR> On Error Resume Next<BR> Set SetTtfTextStyle = ThisDrawing.TextStyles.Add(TextStyleName)<BR> SetTtfTextStyle.SetFont TTFName, False, False, 0, 0<BR>End Function<BR>请问明总:这里面的TTFName如果是“仿宋_GB2312”之类的Windows系列的字体的话,用TTFName="仿宋_GB2312"就可以了,但是要设置成CAD特有的字体,如“simplex9.shx”用TTFName="simplex9.shx"怎么好像就运行不了啊!急死了,望各位帮忙解决,谢谢! 各位大侠请帮帮忙吧!谢谢! <p>在设置acadtextstyle 时用这个呀!</p><p>object.BigFontFile</p>
页:
[1]