Maps

From VoxCommando
Revision as of 11:24, 13 January 2021 by James (talk | contribs) (1 revision)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
MapEditor.png

Maps are used to store and retrieve key-value pairs. They are a convenient way to store and access more complex values that can be used within commands. This can be extremely useful for values such as IR codes, device IDs, and API keys.

Map tables are really just sql data tables with two columns. Unlike user variables, values stored in map tables are non-volatile, meaning that they will not lose their value when VoxCommando is closed, and then restarted.

Map Editor

Using the map editor, we can view and edit maps directly, delete maps and create new maps.

Accessing the Map Editor

The map editor can be accessed two ways.

  • From the Main VoxCommando window by clicking: File >> Open Map Editor
  • From the LCB when editing a command, by clicking the "Open Map" button.

You can select any existing map using the "Map Table" dropdown list on the right.

Actions

There are several core actions for modifying and reading maps and their values within commands.

  • Map.CreateTable
  • Map.DropTable
  • Map.ExportPayloadXML
  • Map.Get
  • Map.GetKey
  • Map.Set
  • Map.Query

You can also directly store matches acquired from previous actions in a command to a map using the action Results.MatchToMap.

Map Variables

Once stored in a map, individual map values can be accessed as needed within our commands.

Within the LCB, we can open the map of interest, find the value we are looking for, and simply drag and drop the value into our actions where needed. (See the videos listed below for demonstrations.)

When dragged into an action, the map value is displayed as a variable of the form: {M:mapName.keyName}. Map variable.png

You could also manually type the name of the map variable in the action parameter field; however, the drag and drop method ensures the variable name will be accurate.

Video tutorials and demos

The following videos are the best way to familiarize yourself with VC's map functions.