Promotic
Login logon

mapAdd - method of the PmMap object

Description:
Sets multiple values of selected object properties (creates the corresponding properties if needed).
Syntax:
Object mapAdd(Variant arglist)
Parameters:
arglist(Variant) The method has a variable number of parameters, but the number must always be even.
The parameters represent pairs of property name and set value.
Return value:
The method returns the same object it was called upon. This is just a helping instrument so the PmMap object can be created in the one row and fill it with values - see Example1.
Note:
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."
See also:
- Pm.CreatePmMap (method)
- PmArray.Array1 (method)
Example1:
JavaScriptSelect and copy to clipboard

var mMap = Pm.CreatePmMap().mapAdd("Temperature", 85, "Pressure", 1.2);
var nVal = mMap.mapGetValueAt("Temperature");   // nVal = 85
Example2:
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.02: Created
PROMOTIC 9.0.34 SCADA system documentation MICROSYS, spol. s r.o.

Send page remark Contact responsible person
© MICROSYS, spol. s r.o.Update cookies preferences