Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Adding Folders to a Project

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Use the Project Explorer window to add folders to create an organizational structure for items in a LabVIEW project.

Adding Auto-Populated Folders to a Project

Adding auto-populated folders adds a directory on disk to the project. LabVIEW continuously monitors and updates the folder according to changes made in the project and on disk. A blue folder icon with a yellow cylinder identifies this type of folder.

Complete the following steps to add an auto-populated folder to the project.

  1. From the Items page, right-click a target or a folder under a target and select Add»Folder (Auto-populating) from the shortcut menu to display a file dialog box. You also can select a target and then select Project»Add To Project»Folder (Auto-populating).
  2. Navigate to and select a directory on disk to add to the project.
  3. Click the Select Folder button to add the current folder to the project. An auto-populated folder appears in the project. LabVIEW automatically adds all contents of the folder to the project. If items in the folder on disk are already in the project, the items move within the auto-populated folder.
  4. From the Files page, you can move, rename, reorganize, and remove files from the auto-populating folder. Project operations from the Files page both update and reflect the contents on disk. Likewise, LabVIEW updates the folder in the project if you make changes to the directory on disk. One advantage of making changes to files from the project instead of from disk is if you update files from the LabVIEW project, LabVIEW can detect filename changes and update caller VIs automatically.
Note Note  (Mac OS X and Linux) LabVIEW does not support the use of symbolic links for files in auto-populating folders on Mac OS X or Linux operating systems.

You also can use the Convert to Auto-populating Folder method to add an auto-populating folder to the project programmatically.

Tip Tip  You can arrange items on the Items page. Right-click a folder and select Arrange by»Name from the shortcut menu to arrange items in alphabetical order. Right-click a folder and select Arrange by»Type from the shortcut menu to arrange items by file type. Right-click a folder and select Arrange by»Path from the shortcut menu to arrange items by file path.

To disconnect an auto-populated folder from disk, right-click the auto-populated folder on the Items page and select Stop Auto-populating from the shortcut menu. LabVIEW disconnects the folder from the corresponding folder on disk. This option is available only to top-level folders and applies recursively to subfolders of auto-populated folders.

You also can use the Stop Auto-populating method to disconnect an auto-populating folder from disk programmatically.

Note Note  The project displays project library contents by library hierarchy and not by disk organization. For example, if a VI exists in a project library file (.lvlib) the VI appears in the project under the library file. The VI does not appear in the project in its location on disk. Similarly, an auto-populated folder cannot contain a virtual folder unless the virtual folder is within a library hierarchy.

Adding Virtual Folders to a Project

A virtual folder is a folder in the project that organizes project items and does not represent files on disk. A silver folder icon identifies this type of folder.

Complete the following steps to add a virtual folder to the project.

  1. From the Items page, right-click a target or a folder under a target and select Add»Folder (Snapshot) from the shortcut menu to display a file dialog box. You also can select a target and then select Project»Add To Project»Folder (Snapshot).
  2. Navigate to and double-click a directory on disk to add to the project.
  3. LabVIEW creates a new virtual folder in the project with the same name as the directory on disk. LabVIEW also creates project items that represent the contents of the entire directory, including files and contents of subdirectories.
Note Note  A virtual folder does not update in the project if you make changes to the directory on disk.

You can convert a virtual folder to an auto-populated folder. Right-click the virtual folder and select Convert to Auto-populating Folder to display a file dialog box. Select a folder on disk to auto-populate with. An auto-populating folder appears in the project. LabVIEW automatically renames the virtual folder to match the disk folder and adds all contents of the disk folder to the project. If items in the directory already exist in the project, the items move within the auto-populating folder. Items in the virtual folder that do not exist in the directory on disk move to the target.

You also can convert virtual folders into LabVIEW project libraries. Right-click a virtual folder under a target and select Convert to Library from the shortcut menu.

Create new virtual folders to organize project items by right-clicking a target and selecting New»Virtual Folder from the shortcut menu.

You also can use the Add Item method to add a folder to the project programmatically.

Adding Target Folders to a Project

To add a target folder to a LabVIEW project, you must have a module or driver that supports targets installed.

You also can use a target folder to organize the targets in your LabVIEW project. To add a target folder to the project, right-click the project root in the Project Explorer window and select New»Target Folder from the shortcut menu. A target folder appears in the Project Explorer window.


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit