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

Add Item Method

LabVIEW 8.5 Help
August 2007

NI Part Number:
371361D-01

»View Product Info

Method of ProjectItem.

Adds a new project item of the specified type to the LabVIEW project with the referenced item as the parent. You also can use the Project Explorer window to add an item to a project.

This method returns an error if the specified type cannot be created under the current item. The method also returns an error when you try to add a shared variable to a library that is not opened in a project.

s">Example

Parameters

NameDescription
outputReturns a reference to the added file.
NameName of the project item you want to add.
PathPath to the project item you want to add.
TypeSpecifies the project item type. The following values are the most common Type values:
  • VI
  • Folder
  • Library
  • XControl
  • EXE
  • DLL
  • Source Distribution
  • Installer
  • Zip File
  • Hyperlink
Some of the values listed above are only supported on certain LabVIEW Development Systems. Refer to ni.com/labview for more information about LabVIEW Development Systems.

To determine the value of Type for a project item that is not listed above, use the Type String property to programmatically return the type of the item.

Remarks

The following table lists the characteristics of this method.

Available in Run-Time Engine and Real-Time Operating SystemNo
Settable when the VI is runningNo
Loads the front panel into memoryNo
Need to authenticate before useNo
Loads the block diagram into memoryNo
Remote access disallowedNo
Must wait until user interface is idleNo
Available with control VIsNo
Available with global VIsNo
Available with strict type definitionsNo
Available with polymorphic VIsNo

Example

Refer to the Add Files to Project VI in the labview\examples\project\viserver directory for an example of using the Add Item method.


Resources


 

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