Academic Company Events NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Creating an Executable with the Application Builder

With the Application Builder, you can create an executable from any operational LabVIEW VI that will run as a standalone program on any other machine with the same operating system. You can also create a LabVIEW Run-Time Engine that is capable of opening and running any LabVIEW VI.

This is a short process, but is sometimes tricky. We will walk through the steps in the following paragraphs. If you already have a VI Library of the VIs you would like to make into an executable, begin at Step 4.

Step 1: Open the main vi that will be in the executable. This will be the vi that the user will see when the executable is opened. From the File menu, go to Save With Options.

Step 2: A window will appear that gives you several choices. If you choose the "Application Distribution" setting as shown below, you will by default create a VI library whose VIs have no block diagrams! This means that you will not be able to edit your main VI or any of its sub-VIs when you open them from this VI library. Make sure to retain a copy of your main VI and its sub-VIs elsewhere on your system so that you can make changes later if needed.



Step 3: You may name the VI library any name that you wish. Once you have a library of the files in your project, you are almost finished. (NOTE: However, a good idea is to give this new library a different name than your current VI or VI library, for reasons described in Step 2.

Step 4: Now, go to the Project pull down menu and then to Build Application. You will now see the following screen. In this screen you will select Embed VI Library and include the .llb file that you created in the prior steps. Now click OK.


Note: if you have not already marked your main VI as "top-level" in its VI library, you will be prompted to choose a VI to be the top-level VI. Choose the VI whose panel you intend to be the window that appears when the executable is launched. You can mark several VIs as top-level, and they will all appear.

Step 5: You will now be prompted to name the executable. You can give it any name you wish. Click the Save button.

Step 6: A window will now appear that tells you that you must choose a top level vi. Click OK. In the window that appears, highlight the vi that you want to open when the executable begins running, and click the check box next to top level. To finish click OK.

Step 7: You will now see a building application window and upon completion there will be another window that will tell you if the build was successful. You will also note that there are other files that you may need to include in the folder where you place the executable on the target machine. These files (daqdrv or serpdrv) can be found in the LabVIEW folder on your development machine. Include daqdrv if your application performs any data acquisition; include serpdrv if your application communicates via the serial port.

Step 8: Once you move on to the target machine, make sure that you have the same version of NIDAQ on the target machine as you do on the development machine (if you are doing data acquisition). Once you place the executable on the target machine, you should be ready to run. If you have problems, make sure that you have included the aforementioned files in the same directory as the executable.

Step 9: If you had any special preferences set in LabVIEW (anything available in the LabVIEW Edit » Preferences menu), these settings are reflected in the file labview.ini, which resides in your LabVIEW directory. If you want these settings to remain in effect for your executable, you will need to copy the contents of the labview.ini file into a new file called my_program.ini, where my_program is the name of your executable. Also, the first line of your executable's file must contain the name of your executable, minus the extension, in brackets. (e.g. [my_program] instead of [labview]) Save this file into the same directory as your executable.



Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality?   Answered Your Question? 
  1 2 3 4 5
Please Provide Additional Feedback below
Please visit Request Support for product support inquiries. submit