请问vb中如何加载cad
请问vb中如何加载cad Sub ConnectCAD()<BR> '连接到AutoCAD<BR> Dim AcadApp As Object '定义一个对象<BR> On Error Resume Next<BR> Set AcadApp = GetObject(, "AutoCAD.Application")<BR> If Err Then '如果没有一个AutoCAD副本在运行<BR> Err.Clear<BR> Set AcadApp = CreateObject("AutoCAD.Application")<BR> AcadApp.Visable = True '启动一个AutoCAD副本并设为可见<BR> If Err Then<BR> MsgBox Err.Description '如果失败,给出错误提示<BR> Exit Sub<BR> End If<BR> End If<BR>End Sub
页:
[1]