Rules
- Last UpdatedApr 22, 2026
- 14 minute read
The rules functionality is provided for all disciplines. Rules can be used to:
-
Validate drawings for correctness
-
Provide feedback on missing elements
-
Highlight drawing elements that match certain conditions
Note:
Rules must be created in a project which is used for data creation.
Rules are stored in a specified target database. The Storage rules window displays when the rules are accessed for the first time in a project.
On the Drawing tab, in the Rules group, click Rules to display the Storage rules window.

Use the Storage rules window to select the target database for rules from the list of available databases.
Note:
The Storage rules window does not open in subsequent sessions. The target database for rules cannot
be modified.
Click OK to display the Manage rules window.

Use the Manage rules window to create, edit and delete rules and rule sets.
Select the project defined element in the tree view to create or paste a rule set. A rule set is used to store rules.
|
|
New rule set |
Creates a rule set in the tree view. |
|
|
Paste rule set |
Pastes a rule set from the clipboard. The pasted rule set and all associated rules are added to the tree view. |
Select the rule set element in the tree view to create or paste a rule. Functionality is also available to copy or delete the rule set.
|
|
New rule |
Creates a rule in the tree view. |
|
|
Copy rule set |
Copies the selected rule set and all associated rules to the clipboard. |
|
|
Paste rule |
Pastes a rule from the clipboard. The pasted rule is added to the tree view. |
|
|
Delete |
Deletes the selected rule set and all associated rules. A confirmation window displays asking you to OK the deletion. Click Yes to delete the selected rule set. |
Select the rule element in the tree view to copy or delete a rule.
|
|
Copy |
Copies the selected rule to the clipboard. |
|
|
Delete |
Deletes the selected rule. A confirmation window displays asking you to OK the deletion. Click Yes to delete the selected rule. Note: |
Select any element in the tree view to import or export project defined rule sets and rules between projects.
|
|
Export |
Allows you to export project defined rule sets and rules for use in a different project. Click to display the Export rules window. |
|
|
Import |
Allows you to import project defined rule sets and rules into the current project. Click to display the Import rules window. |
FIlters
Use the Filters part of the Manage rules window to filter the tree view display.

Discipline
Discipline is the top level element in the tree view.
Use the drop down list to filter the tree view by discipline. Only the disciplines the user is assigned to are listed. Select the required discipline or select [All] to display rules data for all the disciplines the user is assigned to. If the user is only assigned to one discipline it is automatically selected and cannot be changed.
Type
Type is the second level element in the tree view.
Use the drop down list to filter the the tree view by default rules or project defined rules. Alternatively, select [All] from the drop down list to display all rule types in the tree view.
Search
Input a value in the field to search for rule names to filter the rules by.
Tree View
Provides an easy to use graphical method for exploring the rules.

-
The tree view displays the rules in a hierarchy.
-
Click on a rule in the tree view to navigate to the rule and make it the current element.
-
When a check box is selected/deselected, all check boxes below the the check box in the hierarchy are selected/deselected.
-
To expand the element hierarchy, click
to the left of the element name. To contract an expanded element, click
to the left of the element name.
Default rules are supplied with the P&ID discipline. The default rules cannot be deleted. The feedback options for the default rules can be modified.
|
Default rule name |
Rule description |
|---|---|
|
Branches with mismatched attributes |
Highlights intersecting piping network segments with mismatching attributes. For example, bore, pipeline specification, tracing specification, insulation specification or paint specification. |
|
Branches/components with mandatory unset attributes |
Highlights mandatory attributes which are not populated. These are unique attributes which are setup using naming rules. |
|
Branches/components with unset specification and/or bore |
Highlights P&ID items with incomplete attributes. For example, bore or specification. |
|
Piping components available at catalogue with unset component specification |
Highlights piping components with unset component specification references. |
|
Report orphan nozzles |
Highlights nozzles which do not have a parent association to an equipment item. |
|
Report unconnected nozzles with piping network segment |
Highlights nozzles which are not connected to a piping network segment. |
|
Unconnected branches |
Highlights centerlines which are not connected to a P&ID item at either end. |
User defined rules are created in the the Engineer module and do not display in the Manage rules window. Project defined rules can be created, edited, copied and deleted.
Note:
If you want to base a new rule or rule set on a project defined rule but do not want
to edit it, you can copy rules and rule sets from the Project Defined node to the User Defined node and then edit them as required.
Tree view right-click menus
Right-click on a discipline or default type element to display a drop-down menu.

|
Expand All |
Expands all elements below the selected element in the tree view. |
|
Collapse |
Collapses all elements below the selected element in the tree view. |
Right-click on a project defined type element to display a drop-down menu.

|
Expand All |
Expands all elements below the selected element in the tree view. |
|
Collapse |
Collapses all elements below the selected element in the tree view. |
|
New rule set |
Creates a rule set in the tree view. |
|
Paste rule set |
Pastes a rule set from the clipboard. The pasted rule set and all associated rules are added to the tree view. |
Right-click on a rule set element to display a drop-down menu.

|
Expand All |
Expands all elements below the selected element in the tree view. |
|
Collapse |
Collapses all elements below the selected element in the tree view. |
|
New rule |
Creates a rule in the tree view. |
|
Paste rule |
Pastes a rule from the clipboard. The pasted rule is added to the tree view. |
|
Copy rule set |
Copies the selected rule set and all associated rules to the clipboard. |
|
Delete rule set |
Deletes the selected rule set and all associated rules. A confirmation window displays asking you to OK the deletion. Click Yes to delete the selected rule set. |
Right click on a rule element to display a drop-down menu.

|
Copy |
Copies the selected rule to the clipboard. |
|
Delete |
Deletes the selected rule. A confirmation window displays asking you to OK the deletion. Click Yes to delete the selected rule. |
Basic
Use the Basic part of the Manage rules window to modify the name or description of the currently selected rule set or rule.

Definition
Use the Definition part of the Manage rules window to build the rule using logical expressions or PML expressions.

Validation type
-
Select Classes and attributes from the drop-down list to build the rule using logical expressions.
-
Select PML expression from the drop-down list to build the rule using PML expressions.
-
Select Combined Rule from the drop-down list to build a rule which is a combination of other rules.
Logical expressions
The following guidance is given for creating logical expression rules:

-
Each rule must have at-least one logical expression.
-
Each logical expression is composed of:
-
A rule composer - And/Or.
-
A class name which can be set by selecting a class from the Select class window.

-
An attribute belonging to the selected class, or an inherited attribute from another class, which can be selected from the Select Attribute window.

-
A condition.

-
Equal to the condition value.
-
Greater than the condition value.
-
Greater than or equal to the condition value.
-
Less than the condition value
-
Less than or equal to the condition value.
-
Not equal to the condition value.
-
Matches multiple values. For example, (40,50,60).
-
Starts with the condition value.
-
Contains the condition value.
-
Does not contain the condition value.
-
-
A value for the condition.

Add new definition part
Creates a logical expression at the bottom of the grid.

Remove selected definition part
Deletes the currently selected logical expression.

Move selected definition part up one
Moves the currently selected logical expression up one position in the grid.

Move selected definition part down one
Moves the currently selected logical expression down one position in the grid.
-
The example rule definition contains a single logical expression. The rule is matched if the piping connection bore attribute is 50 (mm by default).
PML expressions
PML expressions can be used to create complex rules. For example, to compare attribute values. Database attributes and pseudo attributes must be used in the expressions as there is currently no support for model definitions. See Software Customization Reference for further information.

The following guidance is given for creating PML expression rules:
-
The expression cannot be empty, and must evaluate to a logical value. If the expression does not return a logical value, or the syntax is not correct, an error message displays summarizing the problem.

-
The expression is executed on engineering items associated with drawings. Each engineering item is evaluated separately, consider this when constructing the expression.
-
If the expression evaluates to true, the engineering item is assumed to fulfill the condition, and rule formatting is applied to the engineering item on the drawing, in the same way as classes and attributes validation.
-
There are special keywords provided for identifying annotations and non-intelligent shapes on a drawing. These enable the rule engine to process such items in the same way as other elements. The keywords are:
-
ISANNOTATION – if this keyword is used, then during rule execution, true is returned for every symbolic or text label and for property breaks.
-
ISDUMMY – if this keyword is used, then during rule execution, true is returned for every shape that is not linked with any engineering tag. These can be a symbols not associated with an engineering item (e.g. OPCs) or a primitive geometry drawn directly on drawing.
Similar to intelligent items, annotation and dummy shapes can be modified using the feedback formatting capabilities described in this topic. The exception is Visual Styles, which are not applicable to annotations and dummy shapes.
-
The following example PML expressions can be applied to a drawing:
-
CLSNAM eq ‘Pump’
Finds all engineering items with a class value of Pump.
-
USERMOD neq ‘user.name’
Finds all engineering items that were last modified by a user different than windows user.
-
LeaveBore neq :ArriveBore
Finds all engineering items with different leave and arrive bores.
-
ISANNOTATION or ISDUMMY or TRUE
Finds all items on drawing, including intelligent symbols, annotations and dummy shapes.
Combined Rules
Select Combined Rule from the Validation type list to create a list of existing rules. These rules run in the order you define and depending on whether the rule previously run finds matching items (result = True) or not (result = False):
-
When the rule value is expected to return True, the next rule will only run if the return is True.
-
When the rule value is expected to return False, the next rule will only run when the return is False.
Combined rules can include both logical expression rules and PML rules.

To create a combined rule:
-
After selecting Combined Rule from the Validation type list, from the Join list select either And or Or as required.
-
In Rule Name, select an existing rule.
-
Select
to display the Select rule window:

The rules displayed in the Select rule window are automatically filtered using the filters specified in the Filters section of the Manage rules window.
-
You can use the Search field to search for specific rules in the Select rule window.
-
Select the required rule from the Select rule window and click Select. The rule you selected is displayed in Rule Name in the rule grid.
-
From the Result list, select the expected result, either True or False.
-
Use the following to add new rule rows, delete existing rule rows and to change the order of rule rows:

Add new rule
Creates another rule row at the bottom of the grid. Complete the new rule row as described previously.

Remove selected rule
Delete the currently selected rule.

Move selected rule up one
Move the currently selected rule up one position in the grid.

Move selected rule down one
Move the currently selected rule down one position in the grid.
Example rule execution

This example runs as follows:
-
The Pipe Bore rule is validated first.
-
If nothing passes the Pipe Bore rule, as this is not expected (Value = True), then:
-
The Fluid Specification rule is validated. See step 6.
-
-
If anything passes the Pipe Bore rule, as this is expected (Value = True), then:
-
Items that passed the Pipe Bore rule are checked against the Pressure rule.
-
-
If nothing passes the Pressure rule, as this is expected (Value = False), then:
-
Items that passed the Pipe Bore and Pressure rules are checked against the Number rule.
-
The Fluid Specification rule is then validated. See step 6.
-
-
If anything passes the Pressure rule, as this is not expected (Value = False), then:
-
Items that passed the Pipe Bore rule and the Pressure rule are checked against the Number rule. Other items are removed from the results.
-
The Fluid Specification rule is then validated. See step 6.
-
-
When all the rules joined by an And before a rule joined below them by an Or are processed the next rule is processed, in this case the Fluid Specification rule.
-
Once all the rules have been processed, execution is complete and Validation and Formatting feedback is applied to the items that:
-
Passed the Pipe Bore rule AND the Pressure rule AND the Number rule. In other words, those items that matched the expected rule result in all three cases, whether that was true or false.
-
OR items that passes the Fluid Specification rule.
-
Run
Use the Run part of the Manage rules window to define when to run the currently selected rule.

Select the On event radio button to run the currently selected rule when the drawing is opened or edited. For example, when a tagged element that is linked to a drawing canvas item (engineering item) is modified.
Select the On demand radio button to run the currently selected rule when invoked from the Rules window in the Engineer module.
Validation Feedback
Use the Validation Feedback part of the Manage rules window to define the feedback method when the rule definition is matched.

Severity
Use the drop down list to specify the level of severity for the displayed message when the rule definition is matched.
-
Select Warning from the drop-down list to display a warning message.
-
Select Error from the drop-down list to display an error message.
-
Select Info from the drop-down list to display an information message.
Message
Select the check box and input a message to be displayed when the rule definition is matched.
Highlight
Select the check box and specify a highlight color for the displayed element on the drawing canvas when the rule definition is matched.
Formatting Feedback
Use the Formatting Feedback part of the Manage rules window to define the formatting method when the rule definition is matched.

Configured Visual Style
Select the radio button and specify a visual style for displayed connectors and symbols on the drawing canvas when the rule definition is matched. See Visual Styles for further information.
Custom Style
Select the radio button and specify a custom color and line style for displayed elements on the drawing canvas when the rule definition is matched.
Color
Select the check box and specify a permanent color for the displayed element on the drawing canvas when the rule definition is matched.
Note:
Changes made using the Color option are permanent and there is no undo functionality.
Line style
Select the check box and specify a permanent line style for the displayed line on the drawing canvas when the rule definition is matched.
Note:
Changes made using the Line style option are permanent and there is no undo functionality.
See Export Rule Sets and Rules, Import Rule Sets and Rules and Run Rules for further information.






