Company Events Academic Community Support Solutions Products & Services Contact NI MyNI

Creating a VI Icon

LabVIEW 2013 Help

Edition Date: June 2013

Part Number: 371361K-01

»View Product Info

Create an icon to represent a VI or custom control graphically. Use the Icon Editor dialog box to create or edit icons.

You can use banners to identify related VIs. National Instruments recommends creating and saving a banner as a template. You then can use this template for a related VI icon and modify the body of the VI icon to provide information about the specific VI.

If you want to create an icon for an object in a library, create a library icon instead of using an icon template. LabVIEW applies a library icon to the icon of all objects in the library.

Saving a Banner as a Template

Complete the following steps to save a banner as an icon template for a VI.

  1. Double-click the icon in the upper right corner of the front panel window or block diagram window, or right-click the icon and select Edit Icon from the shortcut menu, to display the Icon Editor dialog box.
  2. Press the <Ctrl-A> keys to select all user layers of the icon, and press the <Delete> key to delete the selection. The default icon is a single user layer called VI Icon.
  3. On the Templates page, select the _blank.png icon template from the VI»Frameworks category. You can browse templates by category or by keyword.
  4. Use the Fill tool on the right side of the Icon Editor dialog box to fill the banner of the icon with a color.
  5. Use the Text tool to enter text in the banner of the icon. While the text is active, you can move the text by pressing the arrow keys.
  6. Select File»Save As»Template to display the Save Icon As dialog box and save the icon as a template for later use. LabVIEW saves icon templates as 256-color .png files.

Creating a VI Icon from a Template

Complete the following steps to create a VI icon that uses the template you created.

  1. Press the <Ctrl-A> keys to select all user layers of the icon, and press the <Delete> key to delete the selection.
  2. On the Templates page, select the template you created. You can browse templates by category or by keyword.
  3. On the Icon Text page, enter up to four lines of icon text for the body of the icon. You can configure the font, alignment, size, and color of the text. If you place a checkmark in the Center text vertically checkbox, the Icon Editor dialog box centers the icon text vertically within the body of the icon.
  4. On the Glyphs page, drag and drop glyphs onto the Preview area.

    Press the <F> key or the <R> key to flip a glyph horizontally or rotate a glyph clockwise, respectively, as you move the glyph. You also can double-click a glyph to place the glyph in the top-left corner of the icon. You can browse glyphs by category or by keyword.
  5. Use the Move tool to move any glyph. Each glyph is on a separate layer and therefore moves separately. Notice that the rest of the icon becomes dimmed when you select a glyph so you can identify which selection you are moving.
  6. Use the editing tools on the right side of the Icon Editor dialog box to edit the icon further if necessary.

    The Icon Editor dialog box creates a new user layer for each non-consecutive use of the editing tools. Select Layers»Create New Layer to create a new user layer during consecutive uses of the editing tools.
    Note  You cannot modify the icon template or icon text with the editing tools on the right side of the Icon Editor dialog box. Use the Templates page and the Icon Text page to modify the icon template and icon text, respectively.
  7. (Optional) Select Layers»Show Layers Page to display the Layers page. Use this page to configure the name, opacity, visibility, and order of the layers of the icon.
  8. Click the OK button to save the icon information with the VI and close the Icon Editor dialog box.

You also can drag a graphic from anywhere in the file system and drop it in the upper right corner of the front panel window to use the graphic as a VI icon. You can drag and drop .png, .bmp, or .jpg files.

Note  If you modify an icon by dragging and dropping a graphic from the file system, LabVIEW creates a user layer called VI Icon for the graphic and deletes any other existing icon information from the Icon Editor dialog box.

You also can use the VI Icon:Set From File method to set the VI icon from an image programmatically. LabVIEW creates a user layer called VI Icon for the image and deletes any other existing icon information from the Icon Editor dialog box.


 

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