Check Definition
- Last UpdatedMar 21, 2024
- 2 minute read
Shapes meeting selection criteria found during rules execution are checked according to definition. The Check can be defined as PML macro or the Check function should be used. The PML macro should be of BOOLEAN type and it should return TRUE if the shape meets the requirements and FALSE if not and if actions defined on next tab page should be taken.

Defining Check as PML Expression
The Check can also be retrieved from the Library. After selecting the option, using the browse button, a list of available Checks are presented.

Selecting the Check Function from Library
If the Check method fails for some reason, a defined action should be taken on the shape. There are a number of standard checks defined in the Diagrams Consistency Rules Library, but it is also possible to define customized checks. These should be defined as classes implementing IDiagramsRulesCheck specified in Aveva.Diagrams.DiagramsRules in Aveva.Diagrams.dll. To be automatically picked up, the class defining check should be placed in a dll named *ConsistencyRulesLibrary.dll.
Apart from defining the check itself there is also an option to decide if the check should be performed for every connection of the shape. If Execute for each connection is checked, a defined PML Expression or selected library check will be applied for every connection of the given shape and an action will be performed on every failed connection. If the option is un-checked checks are performed once for every shape matching the selection criteria.
Note:
Only one check can be specified for each rule.