Flexible Explorer Formula Types
- Last UpdatedDec 14, 2021
- 2 minute read
The flexible explorer formula corresponds to the Flexible Explorer Formula Type attribute.
If PML expression is selected as the Flexible Explorer Formula Type, input a valid PML expression which returns a set of database elements. A node is created for each element in the PBS hierarchy. For example:
COLLECT ALL EQUI
If PML function is selected as the flexible explorer formula type, input an existing PML function which returns an array of string values, assigned to the generated nodes. A node is created for each element in the PBS hierarchy. For example:
!!MyFunction()
Alternatively the PML Function can return an array composed of two arrays defined as:
-
An array of string values
-
An array of corresponding text values to be displayed on the nodes
For example, if three nodes are required then the names (element types) are included in the first array:
!!classes = ARRAY()
!!classes.append('SCEQUI')
!!classes.append('SCNOZZ')
!!classes.append('SCPLIN')
The descriptions (node labels) are in the second array:
!!texts = ARRAY()
!!texts.append('Schematic equipment')
!!texts.append('Schematic nozzles')
!!texts.append('Schematic pipelines')
The PML function is written as follows:
define function !!getSchematicClasses() is ARRAY
!result = ARRAY()
!result.append(!!classes)
!result.append(!!texts)
return !result
endfunction
If External method is selected as the Flexible Explorer Formula Type, input the name of a valid C# method. For example:
AllWorldItems;StandardPBSLibrary
where AllWorldItems is the name of the public C# method and StandardPBSLibrary is the assembly name which contains the C# method. A set of C# methods is available for use from Aveva's StandardPBSLibrary.
It is possible to implement custom classes as well. A custom class must implement the IPBSCollection interface provided by PBSCore.dll. In addition, the name of the dll containing the class should end with PBSLibrary.
If From owners attribute is selected as the Flexible Explorer Formula Type, input a string that contains the name of the attribute used to generate the resulting nodes. The attribute must be valid for the element generated from the owning node in the hierarchy. For example:
MEMB
If the owning PBS object node has generated a set of schematic equipment and the member node specifies DIAREF as the From owners attribute formula, then the resulting child nodes are generated by evaluating the DIAREF attribute on each schematic equipment represented by the appropriate node.
It is possible to use From owners attribute for a node that is not owned directly by a PBS Object node; in this instance the system searches up the hierarchy until a PBS object node is found. PBS text nodes (PBSTXN) are skipped as they do not represent database elements.
Alternatively, click
to display the FlexibleExplorer Formula Editor window, refer to Create a Flexible Explorer Formula for further information.