VB打开AutoCAD图纸的问题
Dim AcadApp As AcadApplicationDim AcadDoc As AutoCAD.AcadDocument
On Error Resume Next
Set AcadApp = GetObject(, "AutoCAD.Application")
If Err.Number <> 0 Then
Err.Clear
Set AcadApp = CreateObject("AutoCAD.Application")
End If
AcadApp.Visible = True
Set AcadDoc = AcadApp.Documents.Open("E:\气缸定位具.dwg")
createobject 的情况下AutoCAD启动了但是没打开图纸,大伙看看是什么原因?
getobject的情况下可以打开图纸的
回复 yuanhui_hust 的帖子
Dim AcadApp As AcadApplication
Dim AcadDoc As AutoCAD.AcadDocument
On Error Resume Next
Set AcadApp = CreateObject(, "AutoCAD.Application")
AcadApp.Visible = True
Set AcadDoc = AcadApp.Documents.Open("E:\气缸定位具.dwg")
Set acaddoc = acadapp.ActiveDocument
页:
[1]