New dialog
![]() |
This page is under construction. This page or section is currently in the middle of an expansion or major revamping. However, you are welcome to assist in its construction by editing it as well. Please view the edit history should you wish to contact the person who placed this template. If this article has not been edited in several days please remove this template. Please don't delete this page unless the page hasn't been edited in several days. While actively editing, consider adding {{inuse}} to reduce edit conflicts. |
The New dialog provides access to create to [[[VI]]s, Polymorphic VIs, LabVIEW Projects, LabVIEW Classes, LabVIEW Project Libraries, Custom Controls (see Control editor), Run-Time Menus, and XControls. VIs can be created from the New dialog using templates that create the VI with a common Design Patterns already established. Other toolkits, like QControls, add options to create other types of content to the New dialog. To access the New dialog from the Getting Started, Project Explorer, VI Front Panel, or VI Block Diagram windows, select File-->New... from the menu bar.

Dialog Parts
The main parts of the New dialog include:
- Create New is a tree control that displays starting points for VIs and other LabVIEW documents. Select an item from one of the following categories and click the OK button to start building a VI or other LabVIEW document.
- Description is a picture control that displays an image and a description of the component you selected in the Create New list.
- Add to project is a checkbox that specifies if the new component should be added to the project you select in the Projects pull-down menu. If no project is available, LabVIEW disables this checkbox.
- Projects is a drop-down combobox that specifies the project to which LabVIEW will add the selected component. This pull-down menu appears only if you have more than one project open.
- Note LabVIEW automatically selects and disables the Add to project checkbox. If no project is available, LabVIEW disables the OK button. If multiple projects are available, you can select the project to which you want to add the item from the Projects pull-down menu.
- The OK button starts creation of the selected component.
- The Cancel button dismisses the New dialog without creating the selected component.
- The Help button launches the LabVIEW Help to the help article about the New Dialog Box.
New Dialog Source Code
The New dialog is written in G and the VI for the dialog box is located in the LabVIEW directory at: [LabVIEW 20xx]\resource\plugins\lv_new.vi. However, the VI is password protected so the block diagram cannot be accessed and the VI cannot be edited.
Adding to the New Dialog
You can add items to the New dialog without editing the source code. To do this you will need:
- A VI that launches your Wizard, or VI Scripting code that creates the component
- The path to where that VI will be installed (if installed by a Package or Installer
- A PNG image that represents your component. This is used in the Description in the dialog. Size should be 256 x 256 pixels.
- A PNG image to be used as the icon in the Create New tree in the dialog. Size should be 16x16 pixels.
- A description of the component to be used in the Description in the dialog
- Generate a GUID for your component
After you have all these items, locate the LVNewDialog.xml file located in the LabVIEW directory at: [LabVIEW 20xx]\resource\plugins\NewDialogFiles\LVNewDialog.xml. To add a node to the XML file for your component you will need to read the file and find the GUID for the Other Files item in the tree. This becomes the <ParentGUID>
in the node you will add.
- Note It is advisable to make a backup of your LVNewDialog.xml before beginning to edit it. It is not impossible to restore if the file is corrupted but it would require a reinstall of LabVIEW if you did.
An example of the XML code for a node is as follows (shown here from the QControl Toolkit):
<Node>
</Node> |
Where the %s under the <GUID>
tag should be replaced with your GUID you generated and the '%s under the <ParentGUID>
tag should be replaced with the GUID Other Files item. Replace the data in the Name, ItemPath, Description, ImagePath, and NDIconPath tags with the information about your component from above. Save the XML and restart LabVIEW to test.
In the case of the QControl Toolkit, editing the LVNewDialog.xml file and adding a node was done as a post-install step of the Package and removal of the node was done as a post-uninstall step of the Package.