Promotic
WikipediaLinkedInYoutubeTwitterFacebook

SetVarSubArray - method of the PmaData object

Description:
The assignment of values from the values array created by the GetVarArray or GetVarSubArray method to the selected variables on the "Data" tab of this object.
Syntax:
Boolean SetVarSubArray(Variant vFrom, Variant vTo, Array array)
Parameters:
vFrom(Variant) Index (or name) of the first variable (zero-based index) to which the first value of the array has to be assigned
vTo(Variant) Index (or name) of the last variable (zero-based index) to which the last value of the array has to be assigned
array(Array) 1-dimensional array whose values have to be assigned to the selected variables
Return values:
true - on successful assignment of values
false - Otherwise
Note:

Values will be assigned to variables with the index in the range of the vFrom and vTo (including) parameters.

The SetVarArray method serves to the assignment of values from the array to all variables.

Example:
JavaScriptVBScriptSelect and copy to clipboard

var arr = Pm.CreatePmArray().Array1(23, 45, 56);
oData.SetVarSubArray(1, 3, arr);
//or
var bDone = oData.SetVarSubArray(1, 3, arr);  //bDone = true or false
PROMOTIC 9.0.13 SCADA system documentation - MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r. o.Tavičská 845/21 703 00 Ostrava-Vítkovice