LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Convert VB code to LabVIEW Active X

Solved!
Go to solution

Hi guys,

 

I have a question that has been bugging me for a couple of weeks now.  For some reason I can't seem to understand how LabVIEW handles Active X calls.  Here is my example.  Suppose I have the following VBA code:

 

Set Devices = ZiApplication.Devices

Set FocusDevice = Devices.Open("Focus")

FocusDevice.Initialize

 

FocusDevice.UpdateParameters    
    

Would the corresponding LabVIEW be something like the following

LabVIEW.JPG

I guess I have just been confused as to how LabVIEW handles calls like FocusDevice.Initialize, since FocusDevice was a variable of type Devices.

 

Cheers,

Shivels

 

 

0 Kudos
Message 1 of 3
(3,325 Views)
Solution
Accepted by topic author shivels

What you put together appears valid. In the VB code the "Set" operation instantiates the class, returning an object of that class. This is the same as the wire that comes out of the Property Node that is accessing the "Devices" property for the IZiApplication class.

Message 2 of 3
(3,318 Views)

Thanks! It all makes sense now, I can't believe it never clicked with me before.

 

Cheers,

Shivels

0 Kudos
Message 3 of 3
(3,295 Views)