The following example uses existing VIs to step through the tasks for building a stand-alone application with the Application Builder. Complete the following steps in each task to create the LabVIEW project for the application build specification, configure the build specification, and build and run the stand-alone application.
 | Note The LabVIEW Professional Development System includes the Application Builder. If you use the LabVIEW Base Package or Full Development System, you can purchase the Application Builder separately by visiting the National Instruments Web site. |
Preparing the LabVIEW Project
 |
Note You must have a project open and saved to configure a build specification. |
- Select File»New Project to create a project.
- Right-click My Computer and select Add»Folder (Snapshot) from the shortcut menu to add a directory of files to the project as a folder. Navigate to and select the labview\examples\Application Builder directory, which contains the VIs and support files you need to build the application. The Application Builder folder appears under My Computer in the Project Explorer window.
- Save the project as TutorialProject in a new directory named AB Tutorial.
Configuring the Build Specification
- From the Project Explorer window, right-click Build Specifications and select New»Application from the shortcut menu to display the Application Properties dialog box. If you previously hid Build Specifications in the Project Explorer window, you must display the item again to access it.
- Complete the following steps on the Information page of the dialog box.
- Enter Tutorial-EXE in the Build specification name text box. The text box contains the name of the application build specification that appears under Build Specifications in the Project Explorer window.
- Enter Tutorial.exe in the Target filename text box. The text box contains the filename on disk for the executable file.
- Click the Browse button next to the Destination directory text box and navigate to the AB Tutorial directory. Create a subdirectory named App. Double-click the App directory and click the Current Folder button to select the directory. When you build the application, the executable file appears in this directory.
- From the Category list on the left, click Source Files to display the Source Files page, which contains settings you can use to specify which files are included and how they are included in the application. Complete the following steps on the dialog box page.
- From the Project Files tree, click the Application Builder folder to expand it. Select AB Tutorial Gui.vi. Click the Add Item arrow button next to the Startup VIs listbox to add the VI to the listbox. VIs you add to the Startup VIs listbox open and run when you run the application.
- From the Project Files tree, select AB Tutorial MeanMedianMode.vi. Click the Add Item arrow button next to the Always Included listbox to add the VI to the listbox. Files you add to the Always Included listbox are in the application, but the application calls them dynamically as needed.
- Repeat the previous step to add the following files to the Always Included listbox: AB Tutorial StndDev.vi, AB Tutorial Histogram.vi, and datafile.txt. Do not add the other files, which are for use in other examples.
 |
Note If you move a VI to the Always Include listbox on the Source Files page, but you choose a destination in the Source File Settings page that is not the same destination as the built application or DLL, the
Application Builder moves all dependencies of the VI to the destination you designate, rather than keep the dependencies in the built application. If two or more VIs that are always included or top-level VIs call a VI and try to move it to two different locations, the Application Builder moves the VI and all subVIs to the built application. To make a VI that is specified as Include if referenced move to a new location, you must specify the VI as Always Included on the Source Files page. |
- From the Category list, click Destinations, Source File Settings, Icon, Advanced, Additional Exclusions, Version Information, and Run-Time Languages to explore the settings you can configure in a build specification. For this exercise, do not change the settings on these dialog box pages.
- From the Category list, click Preview to display the Preview page. Click the Generate Preview button to view a preview of the files that the Application Builder creates when you build the application. You can use this preview to verify that the Application Builder will create the files you want in the directories you want. You can correct errors before you build the application.
- Click the OK button to close the dialog box and update the project with the build specification settings. The Tutorial-EXE build specification appears under Build Specifications in the Project Explorer window.
Building and Running the Application
- Save the project. LabVIEW does not save build specifications settings on disk until you save the project.
- Right-click the Tutorial-EXE build specification and select Build from the shortcut menu to build the application. A dialog box displays the progress of the build. When the dialog box displays the Build Complete message, click the Done button.
- Navigate to the AB Tutorial\App directory. The directory should contain the executable file Tutorial.exe, the LabVIEW configuration settings file Tutorial.ini, and the data directory, which contains the support files datafile.txt and lvanlys.dll.
- Double-click Tutorial.exe to run the application. A file dialog box prompts you to navigate to and select the datafile.txt file, located in the data directory created with the application.
- Click the Acquire Data button to load data in the buffer. Click the Graph Data button to display the data in the graph on the right. Select an analysis to perform in the Type of Analysis section and click the Analyze button to display statistics on the data.
- Click the Stop button to close the application.
(Windows) After you build and run the application, you can build an installer for the application to make it easier to distribute.