AddItem
- Updated2025-07-30
- 1 minute(s) read
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
| Name | Type | Description |
|---|---|---|
| name | String | Name of the project item you want to add. |
| path | String | Path to the project item you want to add. |
| type | String | Specifies the project item type.The following values are the most common type values:
Some of the values listed above are supported only 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. For cross-language reasons, this string is always in English. |
Return Value
ProjectItem*