LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I access methods in third party ocx file and get a return response.

How do I attach a button to a method of an ocx or active x file? Is the activex component available on the front panel?
0 Kudos
Message 1 of 3
(3,044 Views)
Yes, you can embed an ActiveX object in your LabVIEW front panel. Is the button you are trying to use a LabVIEW button or a button within the ActiveX object?

To call an ActiveX method after a button press, simply wait for the button to be pressed and then use an Invoke Node in LabVIEW with its reference wired to the ActiveX refnum.

If you need more help on how to do this, let me know and I'll post an example.

Pete
0 Kudos
Message 2 of 3
(3,044 Views)
You should probably browse directly to the OCX file if the component isn't registered with the system. If it is compatible with the front panel, you can simply drop it into an ActiveX container on the front panel (which requires the OCX to be a control (???)). Otherwise, you can create an ActiveX reference, and browse to the OCX. This will allow you to create invoke and property nodes.

If you have trouble browsing, please post again, but it should simply be a matter of selecting browse, and then browse in the submenu to get file dialog to point to the OCX file directly. One possibility is that even though the control is registered (which makes it show up in the selection dialog), it may not have an obvious name. It is also safer to point to the OCX fil
e, as this prevents your code from breaking if the OCX is upgraded or otherwise altered.
0 Kudos
Message 3 of 3
(3,044 Views)