LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

activeX problem

Hi,
I'm running LabVIEW 7.0 on a windows 2000 machine. I compiled some code written in VB to a dll and am using LabVIEW activeX functions to communicate with it. My VI has an automation open, a couple of activeX function calls, and a close reference.
When I open the VI and try to run it, I get two run time errors which say 'Could not find DRVUSBX' and 'Automation error'. To fix this, I right click on the reference control and under select ActiveX class -> Browse, I find my DLL and select it. When I run the VI again, it works fine. However, the problem is that the VI runs only when I perform this 'update' manually. If I close the VI and Labview and restart, the same error pops up again until I browse for the DLL and perform the update. This happens regardless of if I save the VI or not.
I was wondering if this is merely a path problem or if it is something much deeper. If it is a path problem, is there somewhere in LabVIEW where I can view dll search paths or something like that??
Thanks, and any help would be appreciated.
-Sid
0 Kudos
Message 1 of 4
(2,456 Views)
Hi Sid,

Have you tried Evan's solution from this thread?:

Using a Visual Basic ActiveX DLL in LabVIEW
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 2 of 4
(2,432 Views)
Hi Phillip,
I tried the solution on the link that you posted but unfortunately that did not solve the problem. It is kind of strange how I can get Labview to work by updating the ActiveX refnum by browsing for the dll, but once I close Labview and restarts it seems like Labview 'forgets' where the dll is. Do you think there could be another previously registered dll (because I have had several versions of the VB code) that Labview is looking at? How would I check if this is happening?
Thanks a lot,
-Sid
0 Kudos
Message 3 of 4
(2,416 Views)
Hi Sid,

Is your ActiveX object dynamically generated or is it statically registered? LabVIEW has to be able to "see" the object when you load the VI. I've seen a similar issue with a dynamically registered ActiveX server that would only show up when it was actually running. When you load the VI, LabVIEW will try to link to the ActiveX object. This is different than other ADEs where the linking will not occur until execution. Could that be the issue?

Have you tried Force Compiling )Shift+Ctrl+Run) the VI and then saving it?
- Philip Courtois, Thinkbot Solutions

Thinkbot Solutions
0 Kudos
Message 4 of 4
(2,374 Views)