Deploy a LabVIEW VI Using ActiveX Automation with a DLL

Updated Apr 7, 2023

Reported In

Software

  • LabVIEW

Operating System

  • Windows

Issue Details

I have a LabVIEW VI that uses ActiveX Automation to communicate with another application. When deploying my system, I used the DLL of the client application. When I run my VI, nothing happens and it seems that the ActiveX communication with the application is not working.

Solution

You can control another application using LabVIEW by either calling dynamically its DLL or creating an ActiveX automation task to control the application. LabVIEW acts as an ActiveX server while the application is the client.
You can find information on how to call a DLL from LabVIEW below:
Calling a Dynamic Link Library (DLL) from LabVIEW

To create an ActiveX automation task, you have to call the Automation Open function and build your task as shown below for the Excel ActiveX Callback Event example:



Depending on the method used, the deployment of the LabVIEW application and the client application is going to be different:
  • When using the DLL of the client application, you will have to deploy the main LabVIEW VI along the DLL since it is called dynamically. This can be done through the application builder by adding your DLL in the always included section of the source files. More information on how to use the application builder can be found here: Introduction to┬áthe LabVIEW Application Builder
  • When using an ActiveX automation task, the client application has to be installed on the deployment computer so that the LabVIEW executable can correctly communicate and control the application using ActiveX.