|
Private Sub CommandButton1_Click()
Dim textpoint(0 To 2) As Double '声明文字插入点
Dim texthight As Double
Dim textstr As String
Dim textObject As AcadText
textpoint(0) = 20
textpoint(1) = 40
textpoint(2) = 0
texthigh = 10
textstr = " activex/vba" '设置字符串
Set textObject = ThisDrawing.ModelSpace.AddText_(textstr, textpoint, TextHeight)
ThisDrawing.Application.ZoomExtents
textObject.Update
End Sub
以上代码是一本书上的示例,但我试着运行后出现红字的语句错,提示错误代码"438",对象不支持该属性或方法。在CAD2004和2007版运行均是同样的情况。
请问是什么原因?
|
|