Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Plant SCADA

MapValueGet

  • Last UpdatedJul 18, 2023
  • 1 minute read

Use this function to retrieve the value from a key in a map.

Syntax

VARIANT MapValueGet(STRING sMapName, STRING sKeyName)

sMapName:

Name of map.

sKeyName:

Name of the key to retrieve the value from.

Return Value

Value returned is a VARIANT that also contains QUALITY and TIMESTAMP components, otherwise an error code is returned.

If the map or key does not exist an "Invalid argument" error (274) is raised.

Example

! Demonstrate MapValueGet.
STRING sMapName = MapOpen();
! sMapName is a randomly generated text that uniquely identifies the map
INT iMapValueSetResult = MapValueSet(sMapName, "SomeKey", "SomeValue");
STRING sMapValueGetResult = MapValueGet(sMapName, "SomeKey");
! sMapValueGetResult will be set to "SomeValue"
INT iMapCloseResult = MapClose(sMapName);
! The map that is identified by sMapName is now closed and unavailable

MapClear, MapClose, MapOpen, MapKeyCount, MapKeyDelete, MapKeyExists, MapKeyFirst, MapKeyNext, MapValueSet, MapValueSet

See Also

Map Functions

In This Topic
Related Links
TitleResults for “How to create a CRG?”Also Available in