04-20-2011 01:02 PM
I'm trying to connect to Autodesk Inventor using ActiveX to get number of active documents. Example VBExpress2010 code provided by Autodesk works perfectly. When I switch to the LabView 2009 SP1 I'm getting Error 3005.
For some reason Select ActiveX object-> Browse->Application in Autodesk Object Library is not visible when "show creatable objects only" is checked.
There is also creatable object "_Application(Application.Inventor.1))" but when I use it there are no properties of methods accessible
I have tried everything I could find here but it still does not work.
Can somebody help me?
VB Express example code (reference to the Autodesk Object Library is added in project options):
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim oApp As Inventor.Application
oApp = GetObject(, "Inventor.Application")
MsgBox("Number of documents = " & oApp.Documents.Count)
End Sub
End Class
Public Class Form1
Private Sub Button1_Click(ByVal sender As System.Object,
ByVal e As System.EventArgs) Handles Button1.Click
Dim oApp As Inventor.Application oApp =
GetObject(, "Inventor.Application")
MsgBox("Number of documents = " &
oApp.Documents.Count) End SubEnd Class
04-20-2011 02:00 PM
Did you register the ActiveX control or server on the target machine? See the link below...
How Do I Manually Register Type Libraries, ActiveX Controls, and ActiveX Servers?
Error 3005 can happen if you have choosen a non-creatable object.
See if that fixes all your problems, it has worked for me in the past to resolve error 3005.
-Dave
04-20-2011 02:07 PM
I tried registering and it still does not work. As I mentioned: VB code works and it uses same objects from the library. It seems that Labview has problem with it
04-21-2011 12:17 AM
Onyone? Any ideas?
04-22-2011 08:06 AM