Projects in LabVIEW consist of VIs, files necessary for those VIs to run properly, and supplemental files such as documentation or related links. Use the Project Explorer window to manage projects in LabVIEW. In the Project Explorer window, you can use folders and libraries to group together items, and you can use a list of VI hierarchies called Dependencies to keep track of items a VI depends on.
Using the Project Explorer Window
Use the Project Explorer window to create and edit LabVIEW projects. Select File»New Project to display the Project Explorer window. You also can select Project»New Project or select Empty Project in the New dialog box to display the Project Explorer window.
The Project Explorer window, shown as follows, includes two pages, the Items page and the Files page.
The Items page displays the project items as they exist in the project tree. The Files page displays the project items that have a corresponding file on disk. You can organize filenames and folders on this page. Project operations on the Files page both reflect and update the contents on disk. You can switch from one page to the other by right-clicking a folder or item under a target and selecting Show in Items View or Show in Files View from the shortcut menu.
The Project Explorer window includes the following items by default:
Project root—Contains all other items in the Project Explorer window. This label on the project root includes the filename for the project.
My Computer—Represents the local computer as a target in the project.
Dependencies—Includes items that VIs under a target require.
Build Specifications—Includes build configurations for source distributions and other types of builds available in LabVIEW toolkits and modules. If you have the LabVIEW Professional Development System or Application Builder installed, you can use Build Specifications to configure the following:
You can hide the Dependencies and Build Specifications items in the Project Explorer window. If you hide either item you must display it again to access the item; for example, to build an application or shared library.
When you add another target to the project, LabVIEW creates an additional item in the Project Explorer window to represent the target. Each target also includes Dependencies and Build Specifications. You can add files under each target.
You can place a VI from the Project Explorer window on the block diagram of another open VI. Select the VI you want to use as a subVI from the Project Explorer window, and drag it to the block diagram of the other VI.
You also can use the Project properties and methods to configure and modify projects and the Project Explorer window programmatically.
Sorting Items in a Project
The following list describes some of the caveats and recommendations to consider when you organize items in a project:
- You can use a sort option to sort items within a project. Sort options apply automatically to items within the project and do not alter the organization of a project on disk. Use sort options to better organize and manage items within a project.
- Create a separate directory of files for each project you create. Organizing project files into separate directories makes it easier to identify files related to specific projects on disk.
- Directories on disk do not match the project structure of virtual folders. After you add a directory on disk to a project in a virtual folder, LabVIEW does not update the folder in the project if you make changes to the directory on disk. Add a directory on disk to the project in an auto-populated folder to monitor and update changes on disk in the project.
- (Windows) If you are building an installer, make sure you save the files that are in a project on the same drive as the project file lvproj. If some files are on a different drive, such as a network drive, links can break if you include the project in an installer.
- The structure of files in a source distribution does not have to match the structure in the Project Explorer window. You can specify a different structure when you build a source distribution.
- If you plan to remove items that appear under Dependencies, move the items from Dependencies to the target. You can also remove the item and all callers or redirect the callers. Dependencies lists the VI hierarchies of all VIs in the project.
- When you build an application, you can apply settings to an entire folder. Consider grouping all dynamic items in a folder under the target.
- The project can contain conflicts when two or more items with the same qualified name from different paths exist in the project. A yellow warning triangle appears on any conflicting items. Click the Resolve Conflicts button to view a summary of the project conflicts in the Resolve Project Conflicts dialog box.