Sample Definition of Project Breakdown Structure Hierarchy
- Last UpdatedApr 10, 2024
- 6 minute read
The sample Project Breakdown Structure (PBS) step by step definition for AVEVA Engineering items is explained. The hierarchy displays nodes for all existing systems at the first level below the root. Below each system there are appropriate engineering items grouped by their class (actual type) and description. The engineering items nodes can be expanded to display item members, drawings containing the item and associated 3D and schematic items.
Note:
All Programmable Macro Language (PML) functions and external methods used in the example
are supplied as part of the initial installation.
A Flexible Explorer Template World (PBSWLD) element must be created for storing the template definitions, refer to Create a Flexible Explorer Templates World for further information.
Create a Flexible Explorer Template (PBSTPL) which displays in the Project Breakdown Structure as the root of the hierarchy. Refer to Create a Flexible Explorer Template Definition for further information, the template definition in Lexicon is displayed.

The Project Breakdown Structure in AVEVA Tags displays root node, the text is generated from the PBS Text attribute in the PBSTPL object:

At this point only the root of the PBS hierarchy is defined in Lexicon, defined generated system nodes are required. A PBS object node must be created below the PBS template. In the example, a PML expression is used to capture all available SYSGRP elements.

The PBS in AVEVA Tags displays systems nodes, the nodes are generated according to PBS text defined in Lexicon:

The systems can be expanded to display engineering classes and engineering items. To generate engineering classes a PBS text node is used and the classes are captured with the PML function:

Each system node can be expanded to display a list of engineering classes returned by the !!GetEngineeringClasses() function. Additionally, the icon is set to SCGROU available in AvevaSharedIcons.recources:

The !!GetEngineeringClasses() function has created two arrays: the first array contains text values that are used by the PBS criteria. The second array contains corresponding presentation strings that display on appropriate nodes. The two arrays are organized in another array as the PBS standard requires. The function is available in %PMLLIB%\PBS\functions.
Class nodes can be used to generate engineering items that display below the appropriate systems and classes. The items can be grouped by description. A PBS Object Node (PBSOBN) must be created with a formula that captures engineering elements. The example displays an external method, the CollectEngItems class from StandardPBSLibrary.dll is used. It has been selected from a list available in the Flexible Editor Formula Editor window. In addition the PBS group by attribute is set to DESC.

As a result, nodes for all engineering items are created and are grouped into parent nodes generated for each distinct value of item description. The current definition specifies nodes to appear below every System/Class hierarchy, additional criteria is required to position the new nodes below appropriate parents. To achieve this, a criteria referring to /GetAllSystems and another criteria referring to /GetEngClasses node must be created.
The first Project Breakdown Structure Criteria (PBSCRT) determines the engineering items that are positioned in the hierarchy below a given system.
The SCYSF attribute is evaluated for all engineering items generated by the /GetEngItems node and the value is compared with the node values generated by the /GetAllSystems. If the values are equal, the engine item is positioned below the given system.

The second PBSCRT determines the class that the engineering item belongs to.
The ACTTYP attribute of each engineering item generated by /GetEntItems is compared with the node values generated by the /GetEngClasses to determine if the engineering item belongs to a given class.

The PBS in AVEVA Tags displays Engineering items positioned below the appropriate parent nodes, according to their SCSYSF and ACTTYP attributes. They are grouped in nodes generated from the Description (DESC) values.

After engineering items are organized in the display as designed, the administrator can display elements for each engineering item:
-
Drawings containing the item
-
Available datasheets
-
Linked schematic element
-
Associated design element
-
Members
A label node is required for each of the elements. To achieve this, five PBS text nodes must be created and the PBS formula type of each set to Static text. The text for the resulting generated node is evaluated from the PBS formula.

Label nodes are generated below each engineering item:

Definitions of content for every label node can now be created. PBS object nodes must be used as the members represent existing database elements. Node generating drawings containing given engineering items are described. It is done via the DIAREF array on the connected Schematic element, provided by the PML function "GetPIDs.pmlfnc, using the Engineering Item as a parameter. (Refer to Using Parameters in Flexible Explorer Expressions for further information).

Running the GetPIDs function for each engineering item displays child nodes. The child nodes are positioned below the node generated by the /PandID_label.

Functionality then becomes available to define the generation of datasheet nodes. In the example, to illustrate different options, a list of available datasheets is provided by a PML function.

The GetAllRefNo function is defined as follows:
define function !!getAllRefNo(!type is STRING) is ARRAY
var !objects collect all $!type
return !objects
endfunction
All database elements are captured with the given type, the resulting data capture is an array of database references.
When all datasheet instances are captured, criteria is required to position the datasheet nodes below appropriate parent nodes in the PBS hierarchy. The criteria in the example is based on the DSIAST attribute of datasheet and is matches the value against engineering items.
The DSIAST attribute of all datasheet instances generated by /GetAllDatasheets are matched against engineering items generated by /GetEngItems.

If definitions for associated schematic and design items are required, they can be created using PBS object nodes with the From owners attribute formula. The definition in the example uses the linked schematic item SCHLNK attribute. For each engineering item in the hierarchy, the SCHLNK attribute of child nodes is evaluated and positioned below a node generated by the /SchematicItem_label.

PBS object nodes for generating associated design item nodes are defined in the same way using the DESLNK attribute.

Generated nodes for engineering item members can be processed using the From owners attribute formula type and MEMB attribute. The example is defined using a PML expression with parameter. The expression collect members of #PARAM(/GetEngItems) evaluates each engineering item, the #PARAM(/GetEngItems) expression is replaced with the item reference number. The generated nodes are placed below the appropriate parent nodes in the hierarchy (the engineering item > Members). The parameter string can be inserted using the standard FlexibleExplorer Parameter window.

After all definitions are created, the resulting PBS hierarchy structure displays data as specified.

The Flexible Explorer auto-expands upon the selection of an element.