Promotic
WikipediaLinkedInYoutubeTwitterFacebook

CreatePmArray - method of the Pm object

Description:
Creates object of the PmArray type.
Syntax:
Array CreatePmArray()
Note:
In PROMOTIC JavaScript panels it is not possible to use the standard arrays of the VBScript and JavaScript languages (see Language data types). In these panels, all properties and methods use the PROMOTIC PmArray - see How to use array of values in the PROMOTIC system.
 

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.

Example1:
Creates and fills 1-dimensional array
JavaScriptSelect and copy to clipboard

var arr = Pm.CreatePmArray().Array1(10, 20, 30, 40);
Example2:
Creates and fills 1-dimensional array
JavaScriptSelect and copy to clipboard

var arr = Pm.CreatePmArray().Create(4);
arr.SetItem(10, 0);
arr.SetItem(20, 1);
arr.SetItem(30, 2);
arr.SetItem(10, 3);
Example3:
Creates and fills 2-dimensional array
JavaScriptSelect and copy to clipboard

var arr = Pm.CreatePmArray().Create(2, 3);
arr.SetItem(11, 0, 0);
arr.SetItem(12, 1, 0);
arr.SetItem(21, 0, 1);
arr.SetItem(22, 1, 1);
arr.SetItem(31, 0, 2);
arr.SetItem(32, 1, 2);

History:
Pm8.02.00: Created
PROMOTIC 9.0.15 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
Navigation:
 
- Pm
 
- Abs
- Cos
- CreatePmArray
 
 
- E
- Exp
- LN2
- PI
- Pow
- Sin
- Tan
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice