vb.net与CAD连接无法提示无法创建activex是什么原因
本人初学,想要连接与autocad2007我按照教材的例子写的,
但是有做部分修改
Public Class Form1
Dim acadapp As Autodesk.AutoCAD.Interop.AcadApplication
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Call 连接AutoCAD()
End Sub
Sub 连接AutoCAD()
acadapp = GetObject(, "Autodesk.AutoCAD.Interop.AcadApplication")
If Err.Number Then
Err.Clear()
acadapp = CreateObject("Autodesk.AutoCAD.Interop.AcadApplication")
If Err.Number Then
MsgBox("没有安装autocad")
MsgBox(Err.Description)
Exit Sub
End If
End If
acadapp.Visible = True
AppActivate(acadapp.Caption)
End Sub
End Class
系统提示无法创建ACTiveX
请问诸位
是什么原因的呢