Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

AVEVA™ Engineering

Rules

  • Last UpdatedOct 03, 2025
  • 10 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.

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 the tree view by discipline. Alternatively, select [All] from the drop down list to display all disciplines in the tree view.

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.

Name

Input a value in the field to filter the rules by rule name.

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.

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.

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 logical expressions.

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 one up

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

      Move selected definition part one down

      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. Refer to 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.

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.

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. Refer to 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:
The color option is 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:
The line style option is permanent and there is no undo functionality.

Refer to Export Rule Sets and Rules, Import Rule Sets and Rules and Run Rules for further information.

TitleResults for “How to create a CRG?”Also Available in