Every VI displays an icon in the upper right corner of the front panel and block diagram windows. A VI icon is a graphical representation of a VI that appears on the block diagram and the Functions palette. It can contain text, images, or a combination of both. If you use a VI as a subVI, the icon identifies the subVI on the block diagram of the VI.
The default icon contains a number that indicates how many new VIs you have opened since launching LabVIEW.
Depending on the type of monitor you use, you can design a separate icon for monochrome, 16-color, and 256-color mode. LabVIEW uses the monochrome icon for printing unless you have a color printer.
You also can create an icon for a custom control or indicator.
Complete the following steps to create or edit an icon. You can create an icon for a VI, a custom control, or a custom indicator.
Use the Edit menu to cut, copy, and paste images from and to the icon. When you select a portion of the icon and paste an image, LabVIEW resizes the image to fit into the selection area. You also can drag a graphic from anywhere in the file system and place it in the upper right corner of the front panel window. LabVIEW converts the graphic to a 32 × 32 pixel icon. You also can use the VI Icon:Set From File method to set the icon of a VI from an image programmatically.
Use the Copy from option on the right side of the Icon Editor dialog box to copy from a color icon to a black-and-white icon and vice versa. After you select a Copy from option, click the OK button to complete the change.
Refer to the Icon Art Glossary at ni.com for standard graphics to use in a VI icon.
![]() |
Note You can create a custom-shaped VI icon, smaller than the usual 32 × 32 pixel icon, by leaving unwanted areas of the icon white. Verify that the Background color is white, double-click the Select tool, and press the <Delete> key to delete the entire icon, including the black border. Draw the custom-shaped icon with a closed shape border. All three icons in the Icon Editor dialog box must cover the same area for the VI icon to take up the right amount of space on the block diagram. LabVIEW overlays a LabVIEW class or project library icon mask to class and library icons. If you create or edit an icon for a LabVIEW class or library, use an image no larger than 32 pixels wide by 19 pixels high for the class or library icon to avoid the mask obscuring any part of the icon. |
When you select a custom-shaped icon on the block diagram, a selection marquee appears around each individual graphical element in the icon. For example, if all three versions of a certain icon consist of no borders and a custom shape such as a triangle, and you select the icon on the block diagram, a selection marquee appears around the triangle.
If you want the selection marquee to appear around the 32 × 32 icon space, use the Rectangle tool to draw a border around the Black & White or the 16 Colors icon. The border is invisible on the 256 Colors icon but unites all the graphical elements in one rectangular selection marquee.
Refer to the Custom Shaped Icon VI in the labview\examples\general\CustomShapedIcon.llb for examples of custom-shaped icons.
Use the lv_icon VI template in the labview\resource\plugins directory to create a VI with which you can edit VI icons outside of the Icon Editor dialog box.