Jump to content

Project Explorer: Difference between revisions

From LabVIEW Wiki
Moved table to ProjectItems page. Added link to it instead.
mNo edit summary
Line 23: Line 23:
=== Dependencies  ===
=== Dependencies  ===


Dependencies are files used by files inside the [[LabVIEW Project#Code|code]] section and not explicitly added to the project. LabVIEW 8.5 and up have separate categories for [[Vi.lib|vi.lib]], [[User.lib|user.lib]] and [[Instr.lib|instr.lib]].
Dependencies are files used by files inside the [[LabVIEW Project#Code|code]] section and not explicitly added to the project. [[LabVIEW 8.5]] and up have separate categories for [[Vi.lib|vi.lib]], [[User.lib|user.lib]] and [[Instr.lib|instr.lib]].


=== Build specifications  ===
=== Build specifications  ===
Line 35: Line 35:


== Project Items ==
== Project Items ==
Project Items are individual items as they appear in the tree in the Project Explorer.  Besides files for VIs, Libraries, and Classes; there are items for folders, targets, build specifications, etc. The [[ProjectItem class/Type String property]] can be used to get the value needed for the ''Type'' parameter of the ''[[ProjectItem class/Get All Descendents method]]''.  That method allows you to get all children in the Project that match that specific type.  A list of valid ''Type String'' values and their descriptions are listed on the [[ProjectItem]] page.
Project Items are individual items as they appear in the tree in the Project Explorer.  They can be:
* [[VI]]s
* Libraries  
* Classes
* folders
* targets
* build specifications
* and more  
 
A list of valid [[ProjectItem]]s types can be found on the [[ProjectItem]] page.


=== Folders ===
=== Folders ===
Elements in a project can be organized using folders. The original [[LabVIEW Project]] implementation from [[LabVIEW 8]] to [[LabVIEW 8.20|8.2]] only allowed for ''Virtual folders'' where there was no connection between the project folder or a disk folder.  Upon user request, in [[LabVIEW 8.5]] support was added for [[Auto-populating Folder]]s. These folders are a shortcut to a folder on a disk and will include all the files inside that folder (including sub-folders). However, only [[LabVIEW Project]]s can have [[Auto-populating Folder]]s. Other libraries can only have [[Virtual Folder]]s. '''Note:''' Mixing [[Auto-populating Folder]]s in a [[LabVIEW Project]] with [[Virtual Folder]]s in other libraries is not recommended and might cause [[Cross link|cross-linking]] issues.
=== Libraries ===
Libraries provide organization within a project as folders do.  However, unlike folders, libraries provide [[wikipedia:Namespace|namespacing]] and modularization.  In a project [[VI]]s must have unique names to avoid [[Cross link|cross-linking]] issues.  A library allows for VIs with the same name by providing a namespace for them, the library name is prepended to the VI name. 
Also, when libraries are added to a project only the library file is referenced by the project.  This means that everything the library owns is known only to the library file and not to the project file.  This is helps with modularization because adding to or modifying the library won't necessitate a change to the project file and wouldn't require the project file to be updated in [[Source Code Control]].
=== Nested Libraries ===
Some library types allow for nesting libraries (a library inside of a library).  [[LabVIEW Project Library|LabIEW Project Libraries]], [[LabVIEW Class|LabVIEW Classes]], [[LabVIEW StateChart|LabVIEW StateChart Libraries]], and [[XControl]]s can be added to other [[LabVIEW Project Library|LabIEW Project Libraries]] or [[XControl]]s, only the nested library file is referenced in the parent library file, like with projects.  Again, this helps with modularization by requiring only the modified library to be updated in [[Source Code Control]] and not the parent library.  '''Note:''' [[LabVIEW Class|LabVIEW Classes]] are not allowed to have nested libraries.
=== Targets ===
There are many types of targets (i.e. Real-time OSs, [[FPGA]]s, [[cRIO]]s, [[Raspberry Pi]], etc.  Code cannot be shared across targets.  Trying to use a [[LabVIEW Class]] by two targets will cause the class to be locked for editing.
=== Overlays ===
== Menu Bar ==


Elements in a project can be organized using folders. The original LabVIEW project implementation from [[LabVIEW 8]] to [[LabVIEW 8.20|8.2]] only allowed for ''Virtual folders'' where there was no connection between the project folder or a disk folder.  Upon user request, in [[LabVIEW 8.5]] support was added for ''Auto-Populating folders''. These folders are a shortcut to a folder on a disk and will include all the files inside that folder (including sub-folders). However, only [[LabVIEW Project]]s can have ''Auto-Populating folders'', [[LabVIEW Project Library|LabIEW Project Libraries]] and [[LabVIEW Class|LabVIEW Classes]] can only have ''Virtual folders''. '''Note:''' Mixing Auto-Populating folders in a [[LabVIEW Project]] with Virtual folders in[[LabVIEW Project Library|LabIEW Project Libraries]] and [[LabVIEW Class|LabVIEW Classes]] is not recommended and might cause [[Cross link|cross-linking]] issues.
== Tool Bar ==


== Tips and tricks ==
== Tips and tricks ==
* Select '''Arrange By''' from the right-click menu of a folder to choose between different sorting options.
* Select '''Arrange By''' from the right-click menu of a folder to choose between different sorting options.
* Drop any file into the '''Project Explorer''' to add it to the project. This also works for multiple files and folders.
* Drop any file into the '''Project Explorer''' to add it to the project. This also works for multiple files and folders.
== Project Providers ==
Project Providers are the way to add functionality to the Project Explorer.  To learn more see [[Project Provider]]s.


== History ==
== History ==

Revision as of 17:30, 8 June 2020

The Project Explorer

The Project Explorer window is the window to view and edit LabVIEW Project files (*.lvproj). The Project Explorer was first introduced in LabVIEW 8 as the means to organizes files, hardware configurations, Target configurations, and Build Specifications as a project.

The Project Explorer consists of:

  • A Menu bar
  • A Tool bar
  • An Items Page
  • A Files Page

Items Page

The Items Page shows the contents of a project separated into Targets. Each target represents a platform on which the code will run, for instance, Real-Time modules, FPGA modules, or "My Computer" representing a Windows, Mac, or Linux OS.

Under each target three subdivisions are made:

  1. Code
  2. Dependencies
  3. Build specifications

Code

Items under a target represent links to actual files, these files can be rearranged inside the LabVIEW project to have a better separation like VIs, controls or libraries. Moving things around inside the LabVIEW project will not alter the files or their location except when the files are added or removed from a library-file.

Dependencies

Dependencies are files used by files inside the code section and not explicitly added to the project. LabVIEW 8.5 and up have separate categories for vi.lib, user.lib and instr.lib.

Build specifications

The build specifications contain settings for distributing the code in several forms as a toolkit (source distribution), executable (exe), shared library (DLL) or web-app.

These builds can be included in an installer.

Files Page

The Files Page shows the contents of a project by the directory structure on disk. It does not show the entire file system. Instead, it only shows the directory structure of where items in the project or in the dependencies exist on disk. If a mass file move needs to happen, it is better to do it here that using the files system because it allows LabVIEW to update and maintain any file linking.

Project Items

Project Items are individual items as they appear in the tree in the Project Explorer. They can be:

  • VIs
  • Libraries
  • Classes
  • folders
  • targets
  • build specifications
  • and more

A list of valid ProjectItems types can be found on the ProjectItem page.

Folders

Elements in a project can be organized using folders. The original LabVIEW Project implementation from LabVIEW 8 to 8.2 only allowed for Virtual folders where there was no connection between the project folder or a disk folder. Upon user request, in LabVIEW 8.5 support was added for Auto-populating Folders. These folders are a shortcut to a folder on a disk and will include all the files inside that folder (including sub-folders). However, only LabVIEW Projects can have Auto-populating Folders. Other libraries can only have Virtual Folders. Note: Mixing Auto-populating Folders in a LabVIEW Project with Virtual Folders in other libraries is not recommended and might cause cross-linking issues.

Libraries

Libraries provide organization within a project as folders do. However, unlike folders, libraries provide namespacing and modularization. In a project VIs must have unique names to avoid cross-linking issues. A library allows for VIs with the same name by providing a namespace for them, the library name is prepended to the VI name.

Also, when libraries are added to a project only the library file is referenced by the project. This means that everything the library owns is known only to the library file and not to the project file. This is helps with modularization because adding to or modifying the library won't necessitate a change to the project file and wouldn't require the project file to be updated in Source Code Control.

Nested Libraries

Some library types allow for nesting libraries (a library inside of a library). LabIEW Project Libraries, LabVIEW Classes, LabVIEW StateChart Libraries, and XControls can be added to other LabIEW Project Libraries or XControls, only the nested library file is referenced in the parent library file, like with projects. Again, this helps with modularization by requiring only the modified library to be updated in Source Code Control and not the parent library. Note: LabVIEW Classes are not allowed to have nested libraries.

Targets

There are many types of targets (i.e. Real-time OSs, FPGAs, cRIOs, Raspberry Pi, etc. Code cannot be shared across targets. Trying to use a LabVIEW Class by two targets will cause the class to be locked for editing.

Overlays

Menu Bar

Tool Bar

Tips and tricks

  • Select Arrange By from the right-click menu of a folder to choose between different sorting options.
  • Drop any file into the Project Explorer to add it to the project. This also works for multiple files and folders.

Project Providers

Project Providers are the way to add functionality to the Project Explorer. To learn more see Project Providers.

History

Version Change(s)
LabVIEW 8.5 In LabVIEW 8.5, with the introduction of Auto-populating Folders, the Items and Files tabs were added.
LabVIEW 8 First introduced in LabVIEW 8.

See Also

External Links