ActiveX Features Supported in LabVIEW

Updated Mar 9, 2020

Reported In

Software

  • LabVIEW

Issue Details

I want to use ActiveX in LabVIEW but I don't know which features LabVIEW supports

Solution

Note: When using ActiveX with the Report Generation Toolkit, or when communicating between LabVIEW and Microsoft Office, be sure you are using the 32-bit version of Microsoft Office. 64-bit versions of Microsoft Office are not compatible with LabVIEW. 

Refer to ActiveX and LabVIEW for an overview of ActiveX use in LabVIEW. For reference details on ActiveX VIs, functions, controls, and indicators, refer to the LabVIEW Help: Using ActiveX with LabVIEW and LabVIEW Help: ActiveX Functions .

Additional Information

ActiveX Applications can either be an ActiveX server or an ActiveX client. ActiveX servers export an Application Programming Interface (API) or a set of properties and methods to other applications. ActiveX clients get or set properties and invoke methods of a server and thus can control the behavior of the ActiveX server.

There are two types of ActiveX references available in LabVIEW: Automation Servers and ActiveX Controls. An Automation Server is a DLL that has been explicitly registered with the system to be controlled through ActiveX. An example of an ActiveX server is Microsoft Word. You can use ActiveX automation to launch Word, open a document, and close the application. 

Every ActiveX server "exposes" certain properties and methods to an ActiveX client like LabVIEW which is controlling the server. In the case of Word, an example of a property is the font of some body of text. Performing a spelling check is an example of a method. 

To use ActiveX Server Automation, you should first open a reference to the server with the Automation Open VI. You can control methods and properties using Invoke Nodes and Property Nodes respectively. Once all operations are complete, an Automation Close VI should be used to release the computer resources associated with the connection. 

In addition to ActiveX Automation described above, LabVIEW also allows you to include ActiveX Controls in your application. This is a file with a .ocx extension that has been registered as an ActiveX control. These controls must be placed inside an ActiveX container on the Front Panel. Then the refnum (reference number) from the terminal on the block diagram can be directly wired into the Invoke and Property nodes to access the control. 

If any of your ActiveX controls are not working, this can be due to a missing or un-started ActiveX server on your system. Keep in mind that just because a program runs, that does not mean that your program also has a running ActiveX server.