vb 用2004object库如何得到文字信息
Dim acadapp As Object Dim acaddoc As AcadDocument Dim acadtxt As AcadText '初始化CAD On Error Resume Next Set acadapp = GetObject(, "AutoCAD.application.16") If Err Then Err.Clear Set acadapp = CreateObject("autocad.application.16") If Err Then MsgBox Err.Description Exit Sub End If End If Set acaddoc = acadapp.ActiveDocument (???acadapp没有提示对象,是怎么回事?) Set acadtxt = acadapp.AcadText acadapp.Visible = False acaddoc.Open ("c:\1.dwg")
Dim s As String Dim i As Integer
????(如何得到图中的一些文字信息,)
????(如何关闭文档和关闭autocad2004)
acaddoc.Close