LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

ActiveX Events

How can I transfer data from an ActiveX Event Callback back to the main
program?

Regards

SDC
0 Kudos
Message 1 of 4
(3,142 Views)
Hello Sérgio,

There is a wonderful example that does exactly what you are asking. In the NI Example Finder, look for the �ActiveX Event Callback for IE.vi.� I�m not sure what ActiveX application you are using (this one is for Internet Explorer), but the principles are the same.

If this example doesn�t help, or if I�m not correctly understanding your issue, please post the software and versions you are using, the applicable portions of your code, and any other information that may help, and I�ll be happy to look further into it.

Have a nice day!

Robert M
Applications Engineer
National Instruments
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 2 of 4
(3,141 Views)
Dear Robert,

Actually I went through that Example, but I could not find the way to get back the information from the Callback vi. As there is no information provided with the Callback vi, I couldn't figure out how the title of the webpage (in this example) returns to the main window. Actuallym teh Callback vi's don't allow for an output terminal, or at least I couldn't find a way to connect it.

Sorry if my question is very naive, but I am kind of newbie with Labview and absolutely newcomer with ActiveX

GAbriel
0 Kudos
Message 3 of 4
(3,106 Views)
The callback VI has two inputs called "Event Data" and "User Parameters." "Event Data" is a cluster of information that is provided by the event. In the case of "Title Change", the only element in the cluster is a string called "text". This string contains the new title of the web page. The user parameter passed to the callback VI through the "Reg Event Callback" node for this event is a reference to the string named "Title." Whatever is passed to the callback VI as the "user parameter" will be available as the input to the callback VI called "User Parameters." Here's the key: the reference to the string "Title" will be wired into a property node, and it's text will be set to whatever the event returns as the title. The callback is setting the value by reference rather than passing the value out as a parameter. Keep examining the example, and it should become more clear. Good luck!
Robert Mortensen
Software Engineer
National Instruments
0 Kudos
Message 4 of 4
(3,090 Views)