GetPar - method of object PmiItem

Reading the value of the graphic item parameter. If the parameter is not present in this graphic item, then the parents of the item are searched for it and if not found the search continues up to the PmiRoot graphic item.
GetPar(sPar As String, [nAttr As Long]) As Variant
value = oItem.GetPar(sPar)
sPar(String) The name of the parameter (case sensitive text).
nAttr[optional] (Long) Additional attributes for detecting parameter.
0 (default) - The value is returned as String data type.
1 - The value is returned as Long data type.

If the value cannot be converted into an integer then the method returns NaN value - it can be tested by the Pm.IsValid method.

Return Values:
Returns value of the parameter. If an error occures, it returns the Empty value.
The parameter can be read:
- in script by the GetPar method.
- in configurators by using the macro expression $.par (e.g. for data binding definition.

Both approaches read parameter the cascade way (bubbling), i.e. if item (in which the macro is used), does not have this parameter, then this parameter is searched in its parents (in the immersed item) and finally it is searched in PmiRoot item.

The method is functional also for Web panels.
Read the value from abc parameter. This parameter can be defined in oItem or in its parents.
JavaScriptVBScriptSelect and copy to clipboard

var oItem = pMe.Items("/Panel0");
var x = oItem.GetPar("abc");
PROMOTIC 8.3.29 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