obj = oObject.Pm(sPath)
|sPath||(String) Relative or absolute path to the Pma object in the tree of Pma objects (case sensitive text). |
The path describes the location of the object in the tree of Pma objects. Each tree level adress is separated by the / character. The immersed Pma object is referrenced by its name. The superior Pma object is referrenced by .. characters. The immersed implementation subobject (other than PmaObject type) is referrenced by # character, followed by the implementation subobject type definition (e.g. #vars). It means that the # addressing leaves the Pma objects tree (created by user) and starts to address the implementation subobjects of the Pma object. For example "/appdata/data/#vars/Temperature".
|nAttr||[optional] (Long) enables to change the behavior of the function.|
0 (default) - default behavior.
1 - when referencing the non-existent object the global error in the INFO system won't be generated.
By this method it is possible to get the reference to the defined object relative to the object over which the method is called. The full path (the absolute path) needn't be entered in the sPath parameter but the relative path can be entered. The relative path is entered without the initial slash (/). If it is required to refer to the parent object, then two points can be entered (as it is customary for example by entering the relative path to files in the OS Windows).
If the path defined by the sPath parameter begins with the slash (/), then the path is regarded as the absolute path, i.e. the path is defined relative to the root object of the application - relative to the PmaRoot object.
//Obtains the reference to the Pma object by the absolute path:
o = oObject.Pm("/Boiler1/Temperature");
//Obtains the reference by the relative path. The object will be searched on the same level of the objects tree as the object over which the method is called:
o = oObject.Pm("../Temperature");
//Obtains the reference by the relative path. The object will be searched among subobjects of the object over which the method is called:
o = oObject.Pm("Temperature");
//Obtains the reference to the PmVar subobject of the PmaData object:
oVar = pMe.Pm("/Boiler1/Data/#vars/Temperature");
//Detects the existence of the object (possible error won't be generated in the INFO system):
o = oObject.Pm("/Boiler1/Temperature", 1);