A library icon identifies items as belonging to a project library. Because LabVIEW can apply a library icon to all members of a library, use a library icon to create a banner, and define the rest of the icon separately.

LabVIEW can apply a library icon to all members of a library. As a result, NI recommends the following process for creating icons for members of a library:

  1. Define a common banner: Define the library icon as a banner only, and apply the banner to members of the library. Each member of the library shares this banner in common.
  2. Uniquely identify each member: Modify the body of the icon for each member separately.

    You can use icon templates as a starting point for the body of the icons for the library members.

Create a library icon to represent a project library, statechart, class, or XControl graphically. Use the Icon Editor to create or edit icons.

Creating a Project Library Icon

Use library icons to denote that an item belogs to a specific library. Use library icons together with the unique portion of the icon to identify an item.

For example, you can create the following banner as a project library icon:

Figure 17. Banner Library Icon
Custom icon banner for a LabVIEW project library.

To create an icon for a new project library, complete the following steps.

  1. Right-click the project library item in the Project Explorer window and select Properties from the shortcut menu to display the Project Library Properties dialog box.
    LabVIEW creates a banner as the default icon for a new project library. Notice the default project library icon in the VI Icon Template section of the General Settings page.
  2. Click Edit Icon on the General Settings page to display the Icon Editor.
  3. Optional: To fill the banner of the icon with a different color, use the Fill tool on the right side of the Icon Editor.
  4. To enter text in the banner of the icon, use the Text tool.
    While the text is active, you can move the text by pressing the arrow keys.
  5. Optional: To save the icon as a template for later use, select File » Save As » Template.
    For more information, see Using Icon Templates.
    LabVIEW saves icon templates as 256-color .png files.
  6. To save the icon information with the project library, click OK.
    Notice that the 256 Colors icon on the General Settings page of the Project Library Properties dialog box displays the icon you created.
  7. Optional: To apply an existing project library icon to all VIs in the project library, select Apply Icon to VIs on the General Settings page.
  8. Click OK button to close the Project Library Properties dialog box.

Creating an Icon for a New VI in a Project Library

When you create a new VI within a project library, the VI includes the existing library icon. You can then modify the body of the icon to identify the specific object.

Use icon text, glyphs, and the editing tools on the right side of the Icon Editor dialog box to modify the VI icon. For example, you can create a VI icon similar to the following icon.

Figure 18. VI Icon with Library Icon Banner
Icon with a custom banner and a custom glyph for a LabVIEW project library.

Notice that the green MY LIB banner helps identify the VI as part of the project library.

To create a new VI in a project library and create an icon for the new VI, complete the following steps.

  1. Right-click the project library item in the Project Explorer window and select New » VI.

    Notice that the VI icon in the upper right corner of the front panel window includes the library icon.

  2. Double-click the VI icon to display the Icon Editor.
  3. If the Layers page is not already showing, select Layers » Show Layers Page.

    Notice the following items on this page:

    • The project library icon appears as a user layer called NI_Library.
      Note LabVIEW reverts any changes you make to the opacity or visibility of the NI_Library user layer the next time you modify the project library icon. If you want to modify the opacity or visibility of the NI_Library user layer permanently, apply the changes to the project library icon directly.
    • A user layer called NI_IconNumber contains a number that indicates how many new VIs, up to nine VIs, you have opened since launching LabVIEW.
      Note To disable this numbering, select Tools » Options » Front Panel and remove the checkmark from Use numbers in icons of new VIs (1 through 9).
    • A user layer called VI Icon contains a one-pixel black frame for the icon.
    • The VI icon uses the White w border template, as shown in the Icon Template section of the Layers page.
  4. Optional: Click the preview of the NI_IconNumber user layer and press Delete to delete the layer.
  5. 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 Center text vertically, the Icon Editor centers the icon text vertically within the body of the icon.
  6. On the Glyphs page, drag and drop glyphs onto the Preview area.
    • Flip a glyph horizontally: Press F as you move the glyph.
    • Rotate a glyph clockwise: Press R as you move the glyph.
    • Place the glyph in the top-left corner: Double-click the glyph.
    You can browse glyphs by category or by keyword.
  7. 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.
  8. Use the editing tools on the right side of the Icon Editor 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.

    The Icon Editor dialog box creates a new user layer for each non-consecutive use of the editing tools. To create a new user layer during consecutive uses of the editing tools, select Layers » Create New Layer.

    Note You cannot modify the icon template or icon text with the editing tools on the right side of the Icon Editor. Use the Templates page and the Icon Text page to modify the icon template and icon text, respectively.
  9. Use the Layers page to configure the name, opacity, visibility, and order of the layers of the icon.
  10. Click OK to save the icon information with the VI and close the Icon Editor.

Applying a Library Icon to an Existing VI

After you create a project library icon, you can apply the library icon to an existing VI that you add to the project library.

  1. Add the existing VI to the project library.
    1. Right-click the project library item in the Project Explorer window and select Add » File....
    2. Browse to the VI to add to the project library and select the VI.
    3. Click OK.
    The VI is added to the project library, but LabVIEW has not applied the library icon to the VI.
  2. Open the VI.
  3. Double-click the VI icon to display the Icon Editor.
  4. To import the icon of the owning project library, select Edit » Import Icon from Owning Library....

    LabVIEW adds the project library icon as a user layer of the VI icon called NI_Library. If a user layer with that name already exists, the new user layer overwrites the existing user layer.

  5. To accept the change, click OK.