CreatePmMap - method of the Pm object
Description:
Creates object of the
PmMap type where named values can be added.
Syntax:
Object CreatePmMap([Variant nType], [Variant arglist])
Parameters:
| nType | [optional] (Variant) Determines the meaning of the parameters.
0 (default) - An empty map will be created. arglist no longer contains any additional parameters.
1 - A map will be created containing the initial entries. arglist contains an even number of parameters alternating between the name and value of the initial map entries. |
| arglist | [optional] (Variant) Variable number of parameters, where the meaning varies depending on the parameter nType. |
|---|
Note:
This method is functional also in
Macro expression $.expr and in the
onDraw event of the
PmgCanvas object.
This method is also functional in
Web panels.
If the value
undefined (JavaScript) or
Empty (VBScript) is written to the map, then the given property is deleted from the map."
Example1:
See "
Creating property and setting value" and "
Read property value" in the description of the
PmMap object.
Example2:
JavaScriptVBScriptSelect and copy to clipboard
var mMap = Pm.CreatePmMap();
Dim mMap
Set mMap = Pm.CreatePmMap()
Example3:
JavaScriptSelect and copy to clipboard
var mMap1 = Pm.CreatePmMap(1, "Temperature", 85, "Pressure", 1.2);
// or
var mMap2 = Pm.CreatePmMap().mapAdd("Temperature", 85, "Pressure", 1.2);
History:
Pm9.00.33: The new parameters
nType and
arglist allow you to create an empty map or a map with initial entries.