|
代码如下Imports Autodesk..Interop
Imports Autodesk.AutoCAD.Interop.Common
Public Class Form1
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim AcadApp As AcadApplication
On Error Resume Next
AcadApp = GetObject(, "AutoCAD.Application")
If Err.Number Then
Err.Clear()
AcadApp = CreateObject("AutoCAD.Application.18")
If Err.Number Then
MsgBox("系统未安装AutoCAD。", vbInformation, Me.Text)
Exit Sub
End If
End If
AcadApp.Visible = True
End Sub
End Class
问题现象为“窗口界面没有打开cad,但进程有” |
|