LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Activex options greyed out

Hi,

 

I have a question regarding the automation open.  I create an active x control object and select my Activex class.  When I go to create the method nodes, why are some of the options greyed out?

 

Shivels

0 Kudos
Message 1 of 13
(4,618 Views)
Sorry guys.  I'm was sleep deprived last night.  I figured out what was wrong, I have to write a C wrapper.
0 Kudos
Message 2 of 13
(4,600 Views)
Why would you have to write a C wrapper? Did you create an actual ActiveX control or an ActiveX DLL? Did you register it? If you created a control are you using LabVIEW's ActiveX container?
0 Kudos
Message 3 of 13
(4,590 Views)
I'm using an ActiveX Dll and registered it using regsv32.  I usually just drap an Automation Open on the block diagram and select an ActiveX Class and then create my methods off of that.  I thought I had to write a C wrapper beacause Labview could not handle the return types.  Is there a better way to do this, I've never written a wrapper before so if I can aviod it, that would be great.
0 Kudos
Message 4 of 13
(4,586 Views)

That's the normal procedure for using an ActiveX DLL. The obvious question is what kind of return types are you trying to use? What version of LabVIEW are you using, and what are you using to write the ActiveX DLL?

 

Have you taken a look at the example: Using a Visual Basic ActiveX DLL in LabVIEW?

 

0 Kudos
Message 5 of 13
(4,578 Views)
I'm using Labview 8.0.  This is a precompiled dll, written in C++.  I asked the software application people about the problems I was having using their other dll, and then gave me this dll which they claim uses ActiveX.  I asked them if they could give a header, but they said no and they don't offical support LabVIEW.  Using LabVIEW, when I scroll over the greyed out options, it claims its of type "variant."  This is why I thought I had to write a wrapper in C, because LabVIEW can't handle the return type of some of the functions in the dll.  I really don't want to write a wrapper unless there is no other option.
0 Kudos
Message 6 of 13
(4,575 Views)

LabVIEW can handle variants. You would need to use the Variant To Data function to convert the variant to the appropriate datatype.

 

Can you upload this (supposedly) ActiveX DLL as well as any documentation?

0 Kudos
Message 7 of 13
(4,563 Views)
Here is the (suppsedly) ActiveX dll.  I tried creating an automation open using the "IonBeam" object which worked, but when I try and create a property of this object, some of them such as HV and Spot are greyed out while others such as Apertures and Scanning are able to be selected.
0 Kudos
Message 8 of 13
(4,553 Views)
Too early in the morning, I forgot to attach the dll to the previous post.
0 Kudos
Message 9 of 13
(4,552 Views)
Can't tell for sure - is the DLL dependent on another DLL? I tried adding a COM reference in VB 2008 and C# 2008 (which I've done before), and both gave be an error saying the library couldn't be loaded because the could not determine the dependencies for the DLL.
0 Kudos
Message 10 of 13
(4,544 Views)