'**************************************** ' 连接到AutoCAD应用程序 '**************************************** Dim acadApp As AcadApplication Set acadApp = GetObject(, "AutoCAD.Application")
If Err Then Err.Clear Set acadApp = CreateObject("AutoCAD.Application")
If Err Then MsgBox Err.Description Exit Sub End If End If
'**************************************** ' 设置AutoCAD活动文档 '**************************************** Dim acadDoc As AcadDocument Set acadDoc = acadApp.ActiveDocument
'**************************************** ' 使AutoCAD全屏显示 '****************************************
acadDoc.SendCommand "_zoom" & Chr(13) & "_e" & Chr(13)