Quick Change

From LabVIEW Wiki
Jump to: navigation, search

The Quick Change feature was introduced in LabVIEW 2023 Q3. It introduces a way to create and populate the value of constants on the Block Diagram by first creating a Free Label and then pressing Ctrl+Space while still editing the free label to activate the Quick Change dialog which allows for selection of the constant to create.

Usage

Quick Change Plugins

Like Quick Drop you can create your own Quick Change plugins. Instructions and a Template can be found in: [LabVIEW 20xx]\resource\dialog\QuickChange\plugins\.prefix_Template

Here are the Instructions:

A QuickChange plugin consists of a folder containing a callback VI, a property file, and one or more string files.

Note: To avoid plug-in collisions, the folder names should be given a unique prefix -- company, product, or author info are good prefixes. Folders names beginning with a period '.' or underscore '_' will be skipped and can be used for shared scripting code or other shared resources.

  1. The easiest way to build a new plugin is to duplicate and rename the .prefix_Template folder.
  2. If desired, rename Callback.vi and update Properties.json.
  3. Update Strings_??.json as documented below.
  4. Modify the VI scripting code to construct a replacement object based on the selected text label passed in. Do not change the connector pattern or data types of connected controls and indicators.

Properties.json file: VIName indicates the top level VI to invoke when the menu item is selected. FPValid and BDValid fields determine whether the name will be added to front panel, and/or block diagram QuickChange menus.

Strings_.json file(s): Localization of the visible name used to build the menu is accomplished via the locale-based Strings_.json file. DisplayName is the string that will be shown in the QuickChange menu. When DisplayName strings from multiple plugins collide, they will be annotated with the folder name. Unsupported language files may be deleted, but for the plugin to operate correctly, please include Strings_en.json.

Note: Since debugging of a callback VI is limited, you may want to use the "Test my plugin.vi" to verify the operation of scripting code independent of QuickChange. Directions are on the panel.

Once a well-formed folder is placed into QuickChange/plugins, the name should show up in the QuickChange menu and be called when selected. If the callback VI is broken or returns an error, the scripting will be reverted. Undo/redo should work without any additional scripting code.

See Also

History

Version Change(s)
LabVIEW 2019 Introduction of Quick Change