Rule Manager Programmable Macro Language customization
- Last UpdatedOct 15, 2026
- 2 minute read
The valid values available in the Rule Manager window are controlled by a set of Programmable Macro Language (PML) objects, which you can expand for custom rules.
The PML objects are located in PMLLIB/paragon/objects/CatRuleTypes/. Each PML object in this folder has the same list of members and methods for use with the Rule Manager window.
If you are creating a new rule set type, AVEVA recommends that you open some of these PML objects, especially DefaultRule.pmlobj and GendaiPipeRule.pmlobj, to see the expected style.
In the PML objects, the following members are required:
-
.validRulePurposes - List of purposes allowed for Design Rules (DRULEs) in this rule set.
-
.validBackrefTypes - List of element types which can refer to this rule set by way of the RLSREF attribute.
-
.validTypes - List of values allowed in the “Item 1” and “Item 2” columns. The selected type from this column filters the other columns with different valid values.
The following three members are two-dimensional arrays, corresponding to different lists of values for different items in .validTypes. For example, keys[2][3] refer to the third item in the “keys” array, for valid type 2.
-
.keys - For each valid type, a list of expressions which can be inserted into rules.
-
.descriptions - For each valid type, a list of descriptive text for the keys to be displayed in the window.
-
.dataTypes - For each valid type, a list of data types for these keys, which helps to ensure the window can display proper units.
In the PML objects, the following methods are required:
-
method .logicToArray(!property is STRING) is ARRAY
Transforms logical expressions to array selections. Used by Rule Manager window to match an expression to the member lists.
-
method .arrayToLogic(!selection is STRING, !description is STRING) is STRING
Transforms user selections from arrays to expression logic.
For most cases, the versions of these methods in DefaultRule.pmlobj should be sufficient.
The Rule Manager window gathers a list of available objects using a file in the AVEVA_DESIGN_DFLTS area named: paragon-RuleManagerTypes.pmldat
This file contains blocks of PML code to set up the !!ruleManagerTypes array. This is read by the Rule Manager window to load the appropriate PML object. For a given Rule Set (RLSET) purpose, modify this file with a new code block if a new PML object is added for the Rule Manager.