Navigator Calls (Shortcut Menu)

Calls to the Navigator result in a context menu being associated with a tag type. When the user right clicks on the graphic object representing the value of a tag, the context menu opens and enables the user to configure the tag's properties. Tag properties modified using the context menu are automatically written to the tag properties database, following a call to the "Refresh" module.

Access to the context menu is controlled by the Security Manager, which has a specific system bit set aside for this purpose (\SecurityManager\PrivBitConfigure). The Security Manager handles the privileges granted to the signed in user, and disables any context menu options or tag properties for which the signed in user is not authorized. See: Security for Output Tags

Navigator Module Parameters

The activation of the Navigator should not occur when a tag's widget is in preview mode or when the Navigator module is called from a container's drawing module.

The first parameter for the Navigator module (Enable), detects if the system is in preview mode, or if the Navigator module is being called by a container module.)

Parameters of the Navigator module:

  • Enable - The Enable parameter is set to 1 (true) when the shortcut menu may appear. The shortcut menu is disabled during the preview and placement process.
  • Left - The left coordinate of the object to click upon to open the shortcut menu.
  • Bottom - The bottom coordinate of the object to click upon to open the shortcut menu.
  • Right - The right coordinate of the object to click upon to open the shortcut menu.
  • Top - The top coordinate of the object to click upon to open the shortcut menu.

The Navigator takes groups of four additional significant parameters that describe the menu items and their actions. These parameters are appended to the end of the parameter list in groups of four. Each group of four defines one line in the shortcut menu.

Navigator supports NavData structures for passing parameters to launched modules. Prior to the release of VTScada 12.1.29, modules could be launched from a Navigator call by setting the property NavTabNums to the module name that should be launched, however no parameters could be passed in to that module.

Instead, you can provide a NavData struct, which will contain the module name and up to 16 parameters to be passed to that module. The Navigator works as before with strings, but when a NavData struct is encountered the module will be launched and the parameters in the struct will be passed to it.

NavContents

The shortcut menu option's name. If the name is set equal to "--", a beveled ruling line is placed in the menu, rather than a selectable text option.

NavToggles

A pointer to a value that is a toggle option (i.e. each time this shortcut menu option is selected in the shortcut menu, it is toggled on or off (i.e. is logically inverted)). When the value of the variable pointed to is true, the shortcut menu option is toggled on, and a check mark appears to its left. When the value of the variable pointed to is false, the shortcut menu option is toggled off, and no check mark appears to its left. Any element may be invalid if not used. If the NavTabNums element is used to open the tag's properties folder, this value must be invalid. If the variable pointed to by this parameter is in a module other than the one pointed to by the "Root" parameter (please see previous section), the NavTabNums parameter contains the object value of that other tag.

The NavToggles parameter can also serve a very different purpose if it contains an object value, in which case it will be the tag instance to use to launch the TabNums parameter actions within. This can be used to allow direct access to sub-tag parameter configuration folders, or to launch modules within other contexts. This cannot be used in combination with the TabNums parameter value being invalid, since the TabLabels will not correspond to the correct tag properties folder.

NavDisabled

May have three meanings as follows:

  • Negative number: Treated as a privilege number. A security check will be made to ensure that the currently signed in account has the right to view this menu.
  • 0 (FALSE): Enabled
  • 1(TRUE): Disabled

NavTabNums

An index that indicates the tab number (of the tag properties folder) to display if the shortcut menu option is selected (tag properties folder tabs are labeled starting at 0). If this value is invalid, the entire tag properties dialog is opened (i.e. rather than a single tab displayed as a window, the tag properties dialog will open to the ID tab, and will additionally reveal its other tabs).

If this value is a text string, a module by that name is launched within the scope of the calling tag. If the corresponding NavToggles entry has an object value, the module is launched within the scope of that object value.

If NavTabNums is an instance of NavData(ModuleName, Parm0, Parm1...) the module ModuleName will be launched in the tag scope and passed the parameters supplied. Up to 16 parameters can be supplied in this way

If the variable pointed to by the NavToggles parameter is in a module other than the one pointed to by the "Root" parameter, the NavTabNums parameter contains the object value of that other tag.

If the NavToggles parameter is a pointer to a parameter of a tag that is not in that current tag, this value must be the object value of the tag where that toggled parameter exists.

To summarize, there are the following modes for these parameters:

Action NavToggles NavTabNums
Full tag properties folder Invalid Invalid
Single tab tag properties folder Invalid Tab number
Toggle parm in this tag Pointer to the parm Invalid
Toggle parm in another tag Pointer to the parm Object value of other tag
Launch module in tag scope Invalid Module name (text)
Launch module in tag scope Invalid NavData(ModuleName (text), parameters)
Launch module in other scope Scope in which to run Module name (text)