PML Customisation
User Guide
Use of Flexible Explorer Control
: Description of the Sample Flexible Explorer XML File (FlexibleExplorerSample.xml)
Description of the Sample Flexible Explorer XML File (FlexibleExplorerSample.xml)
The sample XML file (FlexibleExplorerAddin) is available for selection in the Samples directory. For a description of the schema definition, refer to the LEXICON User Guide.
PBSTemplate
This represents the name of the Flexible Explorer definition template. It is possible to create more than one template for each PBSWorld. The template has a text formula (display text) which is displayed in the tree view and it is possible to specify how the elements are sorted beneath this node (natural alphanumeric in this case).
PBSObjectNode
The first PBSObjectNode is named (Equipment) so that it can be referenced in the formula for the second level PBSObjectNode. The display name of each element is set by its "FLNN" attribute. The set of elements at this level in the tree view is determined by a PML formula (COLLECT ALL EQUI).
The second level PBSObjectNode is defined within the first PBSObjectNode. This is named (Nozzles), each element is given a display name (FLNN), and is determined by a PML formula.
Note:
That this time the formula refers to the parents name (Equipment), so that only the nozzles beneath the parent equipment element are displayed as child nodes.
Further Extensions
For a description of further extensions refer to the LEXICON User Guide, this includes sorting of elements in each node, display icon, display name and right mouse context menu definitions.
Custom Refresh Manager
The database updates which are handled within the Flexible Explorer core code are generic and the performance of a flexible explorer control can be an issue for large projects and for complex Flexible Explorer Definitions. So it is recommended that for each Flexible Explorer Definition a Custom Refresh Manager is written in C# as part of the addin.
A Custom Refresh Manager has knowledge of the Flexible Explorer Definition and all database updates for the Flexible Explorer definition should be made as efficiently as possible.
For this example a Custom Refresh Manager would ignore database events (new, delete, change, change of owner) for all elements apart from EQUI and NOZZ elements. Further, all attribute changes for these elements could be ignored apart from a change of name, since this is the display name in this example.
If all database changes can be ignored then the performance of the tree is optimal.
The code snippet below (taken from the Flexible Explorer addin sample project) shows where the CustomRefreshManager is added to the code:
Given the database changes which have occurred the Custom Refresh Manager should set the refresh type for the Flexible Explorer Definition. This can be one of:
•
RefreshArguments.RefreshType = RefreshOperation.None;
•
RefreshArguments.RefreshType = RefreshOperation.NodesOnly;
•
RefreshArguments.RefreshType = RefreshOperation.NodesWithCollections;
•
RefreshArguments.RefreshType = RefreshOperation.WholeTree;
By selecting None the tree will not be refreshed at all, this means that deleted elements are still displayed in the tree, for example. The option WholeTree means that the whole of the tree will be refreshed; this option should be avoided for performance reasons.
1974 to current year.
AVEVA Solutions Limited and its subsidiaries. All rights reserved.