注册 登录
编程论坛 VB6论坛

vb.net与CAD连接无法提示无法创建activex是什么原因

santa17 发布于 2013-04-12 20:24, 1563 次点击
本人初学,想要连接与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
请问诸位
是什么原因的呢
2 回复
#2
成铭2013-04-13 00:40
不懂
#3
santa172013-04-13 13:12
期盼大神拯救啊,是不是因为我VB版本的原因呢
1