我按照你的程序调试没有出错:
- Sub Main()
- Dim ACADApp As AcadApplication
- Dim SignText_insert(2) As Double
- Dim SignText As String
- Dim SignText_height As Double
- Dim SignText_Obj As AcadText
- '定义文字对象
- SignText = "你好"
- SignText_insert(0) = 5
- SignText_insert(1) = 5
- SignText_insert(2) = 0
- SignText_height = 20
- Set ACADApp = GetObject(, "autocad.application")
- Set SignText_Obj = ACADApp.ActiveDocument.ModelSpace.AddText(SignText, SignText_insert, SignText_height)
- ACADApp.ZoomAll
- End Sub
|