How to Create a Map With Non-Default Data Type in Register.vi

Updated Feb 13, 2026

Reported In

Software

  • LabVIEW

Issue Details

How to specify a non‑default data type for the Map In terminal in Register.vi within the Registration Map API? The default data type is a map of sets of 32‑bit signed integers.

Solution

Register.vi supports custom data types. You can change the data types of both the key and the value in the map by creating your own Map Constant and assigning the desired types.
 
Steps
1. Create a Map Constant from Map In terminal of Register.vi.
2. Drag and drop the desired data type (for example, a string constant) into the Value field of Map Constant.
3. Wire an input that matches data type of the existing keys in the map to key terminal and wire an input that matches data type of the elements in the sets of the map to set element terminal.
Figure 1. Register.vi with Map Constant using non‑default data type

 

Refer to the following example file included in LabVIEW.

  • C:\Program Files\National Instruments\LabVIEW 20xx\examples\Design Patterns\Registration Map

Additional Information

Note: This image is a LabVIEW snippet, which includes LabVIEW code that you can reuse in your project.

To use a snippet, right-click the image, save it to your computer, and drag the file onto your LabVIEW block.