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: 

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,640 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,621 Views)