Update cookies preferences
Promotic

GetItem - method of the PmfTreeItem object

Description:
Returns the tree item on the specified path.
Syntax:
Object GetItem(Long nWhat, Variant vPar, [Long nAttr])
Parameters:
nWhat(Long) Path type to the requested tree item (object of the PmfTreeItem type).
0 - Returns the item on the path consisting of of identifiers of individual tree items.
See the PmfTreeItem.Id property.
1 - Returns an item located on the path composing of indexes of individual tree items (zero-based index).
If sPar is a number (index), then it returns the subitem with this index.
vPar(Variant) String with the path to the requested tree item.
nAttr[optional] (Long) Additional attributes.
0 (default) - Returns null, if requested dynamic item (see RequestType), or some dynamic parent item is not read yet. Calling of the GetItem method therefore does not trigger the onItemRequest event.
1 - If the desired dynamic item (see RequestType), or some dynamic parent item is not read yet, then the onItemRequest event is triggered.
Note:
This method is also functional in Web panels.
Example:
JavaScriptSelect and copy to clipboard

var oTreeItem1 = oTreeItem.GetItem(0, "/id1/id2");   // Absolute path composed of item identifiers
var oTreeItem2 = oTreeItem.GetItem(0, "../../id1/id2");   // Relative path composed of item identifiers
var oTreeItem3 = oTreeItem.GetItem(1, 0);   // Returns the first subitem (subitem with index 0)
var oTreeItem4 = oTreeItem.GetItem(1, "/2/5");   // Absolute path composed of item indexes

History:
Pm9.00.26: Created
PROMOTIC 9.0.28 SCADA system documentation MICROSYS, spol. s r.o.

Send page remarkContact responsible person
© MICROSYS, spol. s r.o.