为何连接不上cad?望赐教~!
我用的是XP系统,VB6.0和AUTOCAD2005,为何用VB连接不上CAD,望赐教,谢过先!Public acadApp As AcadApplication<BR>Public acadDoc As Object<BR>Public moSpace As Object<BR>Public paSpace As Object
Sub main()
On Error Resume Next<BR>Set acadApp = GetObject(, "AutoCAD.Application")<BR>If Err Then<BR> Err.Clear<BR> Set acadApp = CreateObject("AutoCAD.Application")<BR> If Err Then<BR> MsgBox Err.Description<BR> Exit Sub<BR> End If<BR>End If<BR>Set acadDoc = acadApp.ActiveDocument<BR>Set moSpace = acadDoc.ModelSpace<BR>Set paSpace = acadDoc.PaperSpace<BR>acadApp.Visible = acTrue<BR>Form1.Show
End Sub<BR>下面是我相关图片:
Set acadApp = GetObject(, "AutoCAD.Application")加版本如何那?
Set acadApp = GetObject(, "AutoCAD.Application.16.2")<BR><BR> 不行啊,老大!
斑竹呢?快说说,急用! Set acadApp = GetObject(, "AutoCAD.Application.16") 好的,谢谢!
页:
[1]