From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Calling an ActiveX Object from LabView

I have an ActiveX method that returns an object as a variant. The object has methods that can be called.
 
The following is functional vbscript code that I want to code into LabView.
 
Set Analyzer = WScript.CreateObject("CATC.USBTracer")
Set Trace1 = Analyzer.OpenFile("data_0_Sample.usb")
Trace1.Save "S:\data\test1.usb"
Trace1.Close
The first line is implemented in LabView as an Automation Open
The second line is implemented in LabView as an Invoke Node with OpenFile as the method
 
How do I use the variant to call the Save method from the returned object?
 
 
 
0 Kudos
Message 1 of 2
(2,132 Views)
You want to use the Variant to Data node, wiring in an ActiveX constant configured to the interface type you want.
0 Kudos
Message 2 of 2
(2,113 Views)