CheckType | (Long) Specifies what waiting items have to be removed
0 - remove all items (in this case the CheckVal parameter has no meaning)
1 (2,3,4,5) - remove items that meet: Val1 (2,3,4,5) = CheckVal
10 - remove only the first item from the queue (in this case the CheckVal parameter has no meaning)
11 (12,13,14,15) - remove only the first item from the queue that meets: Val1 (2,3,4,5) = CheckVal |
---|---|
CheckVal | [optional] (Variant) compared value, see the CheckType parameter |
Params | [optional] (String) Additional parameters of the method. Entries are in the KeyVal format, for example return:count;.
"return:xxx;" - Specifies what will be returned by the method.
"return:values;" - Returns 2-dimensional array (PmArray) with values Val1, Val2, Val3, Val4, Val5 for each item.
The array will be in the format (Col,Row) - 2-dimensional array meaning an array of rows, where Col are Val1, Val2, Val3, Val4, Val5 and Row are the individual items removed. If no items are removed, then the method returns: null for JavaScript or Empty for VBScript (it can be tested by the Pm.IsValid method). |
var oSequencer = pMe.Pm("/Sequencer");
oSequencer.Remove(0);
var oSequencer = pMe.Pm("/Sequencer");
oSequencer.Remove(1, "ID1");
var oSequencer = pMe.Pm("/Sequencer");
var aRemoved = oSequencer.Remove(1, 100, "return:values;");
// 1030 = PmArray
if (Pm.GetVarType(aRemoved, 2) == 1030 && aRemoved.GetSize(1) == 5)
{
var nItem = aRemoved.GetSize(2);
for (iItem = 0; iItem < nItem; iItem++)
{
var val1 = aRemoved.GetItem(0, iItem);
var val2 = aRemoved.GetItem(1, iItem);
var val3 = aRemoved.GetItem(2, iItem);
var val4 = aRemoved.GetItem(3, iItem);
var val5 = aRemoved.GetItem(4, iItem);
Pm.Debug("val1 = " + val1 + ", val2 = " + val2 + ", val3 = " + val3 + ", val4 = " + val4 + ", val5 = " + val5);
}
}