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

AddItem 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.

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.

Syntax

object.AddItem(name, path, type)

Parameters

NameTypeDescription
nameStringName of the project item you want to add.
pathStringPath to the project item you want to add.
typeStringSpecifies 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 TypeString property to programmatically return the type of the item.

Return Value

ProjectItem*


Resources


 

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