How can I Add an Image to a LabVIEW Executable?

Updated Oct 29, 2020

Environment

Software

  • LabVIEW

I have created a LabVIEW project that involves loading an image on the front panel. LabVIEW locates the image on my computer using a filepath I have built in the code, but I want to deploy my VI as an executable. How can I include the image in the executable?
 


Here is one method to include and locate an image in the LabVIEW build.

1.  In the LabVIEW Project right-click My Computer > New > Virtual Folder
2.  Right-click the New Folder > Add > File  and browse for the image on the computer.
3.  In the VI where the image is to be loaded, create a file path using the Application Directory VI, which returns the current location of the VI/Executable. An example of this is shown below
                 Note: The data folder is created when the application is built. The image will be located in that folder after following the above steps

4. Once the VI is edited, build your executable. Right-click Build Specifications > New > Application (EXE).
5. Go to Source Files, and place the VI we edited earlier in the Startup VIs box. Place the image in the Always Included box.
6. This will place the image in the data folder at the same level as your .exe, which matches the file path created in step 3.