VI Icons

From LabVIEW Wiki
Jump to: navigation, search
WarningIcon.png

This page is in need of updating. Some information on it may be out of date, and should not be relied on.

VI Icon Importance

The icon you use to represent your subVI can tell you or other developers a lot about what the subVI does without ever having to open the subVI. Taking the time to create at least simple text VI icon is a requirement when sharing code between developers. The use of images in VI icons can also enhance thier meaning when text can't be used because of length. National Instruments keeps an Icon Art Glossary to help developers who are less experienced making easy to recognize icons.

How to Make icons smaller than the entire square

Sometimes it is desireable to make a LabView subVI's icon smaller than the normal 32x32 pixels. National Instruments has done this with several primitives and has made it possible for end users to make custom icons of any size for a subVI.

Starting with a typical icon editor
Typical icon editor.png

Clear the default icon from the 256 icon, then click on the "Show Terminals" checkbox. Draw a box, around the terminals you wish to have displayed on your custom icon.
Icon editor with small icon.png
Fill the 256 color icon with a color of your choice, as well as any words or symbols you wish to use to describe your subVI's work, then copy the subVI to the black and white icon by selecting the black and white icon and pressing the copy from 256 color button on the right.
Icon editor with all small icons.png


You can even make irregularly shaped icons. The white area outside will be transparent in your diagrams. Interestingly, if the border you define is not contiguous, the inside of your icon will also be transparent (you can see a wire go all the way to its connection point (visible as a little cross in the "show terminals" icon view). You can actually have multiple non-transparent areas in your icons if you wish.

Other icon tricks

Double Click

There are certain tools in the icon editor that are "double-clickable". Double clicking on the selection, filled box, and empty box tool icons in the editing palette will apply that tool to the entire icon square. Double clicking on the font tool will bring up a font dialog for selecting font name, size, color, justification, and style (bold, italics, etc).

Double Clickable Icon Editor tools.png

Move text

While typing a text into the Icon Editor the text is movable by using the arrow keys on the keyboard.

Alternative Icon Editors

As of LabView 8.0 a custom icon editor could be built and called from LabView to edit icons of VIs. The relevant information to replace the built in VI icon editor is avaliable here.