ni.com is currently undergoing scheduled maintenance.

Some services may be unavailable at this time. Please contact us for help or try again later.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Please help! ActiveX Methods Problem

I have an ActiveX object method that takes a pointer input/output. I need
to call the method from a LabVIEW VI, but I can't figure out how to send
or receive a pointer! Is this possible?
0 Kudos
Message 1 of 5
(3,487 Views)
> I have an ActiveX object method that takes a pointer input/output. I need
> to call the method from a LabVIEW VI, but I can't figure out how to send
> or receive a pointer! Is this possible?

If you pass a LV value into a server interface
that takes a pointer, then it will automatically
pass a pointer and pull the value back for you.
In other words, I think it transparently does
what you need.

Interface pointers or references are different.
Just wire them to a property or invoke node.

Greg McKaskle
0 Kudos
Message 2 of 5
(3,487 Views)
"Dave Lora" wrote:
>>I have an ActiveX object method that takes a pointer input/output. I need>to
call the method from a LabVIEW VI, but I can't figure out how to send>or
receive a pointer! Is this possible?
0 Kudos
Message 3 of 5
(3,487 Views)
I have the exact same problem but I didn�t understand the answer given on
the newsgroup. Did you ever get this to work? I need to pass a four element
1 dimensional array but I just get a broken link when I wire it up

Thanks,

Larry
0 Kudos
Message 4 of 5
(3,487 Views)
In article <3818ab66@newsgroups.ni.com>,
"Dave Lora" wrote:

>
>I have an ActiveX object method that takes a pointer input/output. I need
>to call the method from a LabVIEW VI, but I can't figure out how to send
>or receive a pointer! Is this possible?

This may help in reading a pointer into LabVIEW: I had a situation where I was using the
"Sheet.Add" method in MS Excel, and this method returns a pointer (purple wire) to a worksheet
object. So to be able to use this pointer, I had to convert it to a Labview refnum (green wire)
using the "Convert to G data" function of the ActiveX palette. But what should I wire to the type
input of the "Convert to G data" function? What worked was this: put an automation refnum on the
front panel, right-cli
ck and browse until you find the appropriate activeX object type def (in
this case Excel._Worksheet), then use this terminal as the type input to the "convert to G data"
function. Of course this only works if the browse turns up the object type you are looking for.
As for passing pointers out of LabVIEW (i.e. pointer inputs into a LabVIEW activeX method
function), I'm not sure - I thought LabVIEW converted any of its built-in types to a Variant data
type.
Vinny.R.
0 Kudos
Message 5 of 5
(3,487 Views)