Table Of Contents

Adding Custom Glyphs, Shortcut Menus, and Toolbar Buttons

Last Modified: March 24, 2021

Use elements in the Custom Device XML to configure custom user interface components, such as glyphs, toolbar buttons, and shortcut menus.

Before you begin, you should understand the custom device XML and the custom device specific XML tags.
  1. Open the LabVIEW project for your custom device.
  2. In Project Explorer, browse to My Computer»Custom Device <Name>.xml and open the XML file of your custom device.
  3. Depending on your goal, complete any of the following tasks to configure the user interface of your custom device.
    Goal Description Task
    Adding glyphs A glyph is the icon that appears next to an item System Explorer.

    Within the <Page> tags for an item, you can use the <Glyph> tag to configure a custom glyph to display for the item. You can use any PNG file as a glyph.

    A collection of glyphs that install with VeriStand is available in the <Application Data>\System Explorer\Glyphs directory.

    Adding toolbar buttons A Toolbar button appears in the toolbar of System Explorer. These buttons only appear when displaying the configuration page associated with the button.

    Within the <Page> tags for an item, you can use the <ButtonList> tag to configure the toolbar buttons that appear with the item's configuration page. Each <Button> must include a unique <ID> string that identifies the button. The toolbar button displays by default.

    However, in each page VI, you can use the Disable Dynamic Button VI and the Enable Dynamic Button VI to dynamically disable and enable a button for that page based on its unique ID. These VIs are useful when you want the toolbar button to appear only when certain conditions are true.

    These VIs are located in the labview\vi.lib\NI VeriStand\Custom Device API directory.

    The following is an example framework you can use to implement a toolbar button.

    Adding shortcut menus

    A shortcut menu for an item is the menu that appears when you right-click the item in System Explorer.

    Within the <Page> tags for an item, you can use the <RunTimeMenu> tag to configure the shortcut menu for the item. Each <MenuItem> you add under <RunTimeMenu> includes an <Item2Launch> section that specifies a VI to run when an operator selects the menu item.

    The Custom Device API library includes a template for this VI, RunTimeMenu Custom Item 2 Launch.vit, in the labview\vi.lib\NI VeriStand\Custom Device API directory.

    The following is an example framework you can use to implement a shortcut menu.

  4. Save and close the XML file.

Recently Viewed Topics