'对于2004,修改一下帮助里的例程有
Sub Ch2_ConnectToAcad() Dim acadApp As AcadApplication 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
Dim acadDoc As AcadDocument Set acadDoc = acadApp.Documents.Open("F:\ALIN\3000091_siteplan.dwg") End Sub |