Change the Colours of Multiple Items
- Last UpdatedJan 30, 2025
- 8 minute read
This procedure is used to change the colours of multiple items on multiple drawings within a project, based on their AVEVA P&ID properties.
The process creates copies of the selected drawings and applies the re-colouring procedure to them. The original drawings are not changed.
The selection of drawings, the item selection criteria and the re-colouring process itself is carried out using the AVEVA P&ID Colouring Utility application.
Procedure - Overview
In the AVEVA P&ID Colouring Utility application, an AVEVA P&ID project is selected, from which drawings to be subject to the procedure are then selected.
The procedure is relatively simple. The user may simply specify, for example, that all Instruments with a tag prefix value of "ABC" will be changed to a selected colour.
Multiple criteria for applying colour changes may be specified. For example, that all Instruments with a tag prefix value of "ABC" and / or of a specified item type.
Multiple criteria must be specified when changing the colour of items based on UDA values (including Dataset UDAs), because in addition to a value needing to be specified, the name of a Dataset or UDA must also be specified.
Refer to Add User-Defined Attributes for more information on UDAs, including Dataset UDAs.
Colouring Utility criteria settings are saved as "Rule Sets" for future use.
Procedure - Open the AVEVA P&ID Colouring Utility
To open the Colouring Utility from within AVEVA P&ID, select the Colouring option in the Colouring group of the Manage tab.
To open the Colouring Utility from the The Graphical User Interface, start it by clicking on the AVEVA P&ID 12.2.SP3 desktop shortcut:

Select the required project from the row of tiles along the top of the screen by clicking on it. Use the arrow buttons < > at each end of the row of these tiles to browse through the list of projects.
Once a project is selected, the launcher will then open a tile displaying the name and description of that project (click the >> button in that tile to return to the list of projects).

User and password fields will also be displayed. The User field includes a list of all project users. Complete these fields as required. Then navigate to Colouring tile and click on it (use the arrow buttons < > at each end of the row of tiles to browse the list of applications).
The following dialog is then displayed:

The list of drawings in the selected project is displayed is the lower part of the dialog.
This part of the window can be hidden and revealed using the Details button.
Procedure - Specify Colouring Criteria Rules
The rules for re-colouring items are grouped into rule sets. Rules themselves may consist of multiple criteria.
To create or edit a rule set, click the Manage Rules option in the main utility window.
The Colouring Rules dialog is then displayed:

Specify the name of a new rule set by clicking Add New Rule. The New Rule Set dialog is then displayed:

Enter the name of the rule set and select OK. The name of the new rule set is then displayed in the Select Rule Set Name field.
Note: In earlier versions of the colouring utility, the rules set up for a project were saved to an XML file. A facility is available to import such rules.
To edit an existing rule set, select it from the list Select Rule Set Name field. The details of the rule set are then displayed.
Add a Rule
To set up a new rule within a rule set:
-
From the Item Type field, select either Equipment, Instrument, Pipe, Valve or Drawing, depending on the type of items to be re-coloured.
-
In the Matching Criteria window, select the AVEVA P&ID property of the items to be re-coloured from the list in the Property Name field.

As well as basic item properties, the list includes Dataset and User-Defined Attribute (for example, non-Dataset UDA) names and values. The list also includes an option to add a rule for pipes drawn with graphical tracing.
A user may therefore, for example, choose to re-colour items based on their association with a specific dataset value, as well as their basic AVEVA P&ID properties.
-
Select the required the condition from the Condition field. Equals, NotEquals, In, NotIn, GreaterThan and SmallThan conditions may also be selected.

-
In the Value field, enter the value of the selected property that the selected condition is to be applied to.
-
Select Choose Colour and from the dialog that is then displayed, choose the colour that items will be re-coloured in. The colour of the button will change to that of the selected colour:

-
The colouring criteria may consist of multiple rows, each defining a different criteria. Once the details of the first row are completed (by specifying a value in the Value field), another row of fields is then displayed underneath the first in the Matching Criteria window, which can be used for specifying another rule criteria.
Set up this criteria in the new row as described above. In addition, in the Join Criteria field, select "And" or "Or" as appropriate.

-
Once all rule criteria have been defined, click Add Rule. The rule is then added to the list of rules in the rule set displayed in lower window:

Edit a Rule
To edit a rule, select it from the list of rules in the rule set in the lower window. The rule criteria are then displayed in the upper window. The rule criteria rows may then be edited as previously described in Add a Rule.
To delete a row from a rule, right-click on it and select Delete from the menu that is then displayed.

Click Edit Rule once the required changes have been made. The rule as displayed in the lower window is then updated with the changes.
Delete a Rule
To delete an entire rule from the list, select it and either click Delete, or right-click on it and select Delete from the menu that is then displayed.
Import Colouring Rules created with earlier versions of the Colouring Utility
In earlier versions of the colouring utility, the rules set up for a project were saved to an XML file.
To import these "legacy" version rules, click Import Legacy XML. Browse for and select the required XML files in the window that is then displayed, and select Open.

The rule sets defined in the file will then be added to current project.
Save and Exit
To save a rule set, select Save. The following message is then displayed:

Select Exit to exit the window. If there are unsaved changes to the rule set, the following message is displayed:

Select either Yes or No as required.
Procedure - Performing the Colour Change Operation
In the main AVEVA Colouring Utility dialog, select the colour changing rule set to be applied from the Select Rule Set list.
Specify which drawings are to be subject to the colour changing operation by checking their Select Drawing checkboxes. Check the Select All checkbox to check all the Select Drawing checkboxes.
Select Apply. The colour changing operation then takes place. The progress bar and messages in the top part of the window indicate the progress of the procedure.

To stop the operation, select Cancel.
When a drawing has been processed successfully, a green tick is displayed in its Result field. A red cross is displayed if the drawing is processed with errors.
Once a drawing has been processed, details of errors and warnings can be viewed by selecting its View Log File.
To view a re-coloured drawing created by the process, click the appropriate View Drawing button. The drawing is then displayed in a new window.

Drawings viewed in this way are read-only.
Re-colour Drawing Items Based on their Dataset Attributes - Full Example
It is required that all pipes with a pressure value of 200 are changed to a specified colour.
The project includes a Dataset called "PRESSURE", which is assigned to pipes in the project (Item Group = Pipes), for example, all pipes may be assigned a pressure value as a property. Datasets are defined using the User Defined Attributes - DataSet Sub-Category of the AVEVA P&ID Project Administration program:

When pipes are labelled, they can be assigned a pressure value by entering it into their Properties dialogs:

In the AVEVA Colouring Utility, access the Colouring Criteria dialog from the Settings button, and set the criteria as follows:
-
Select "Pipe" from the Item Name field.
-
Select "dataset name" from the list in the Property Name field.
-
Select "Equals" in the Condition field.
-
Enter "PRESSURE" in the Value field.
-
In the next row, select "And" from the Join Condition field.
-
Select "dataset value" from the list in the Property Name field.
-
Select "Equals" in the Condition field.
-
Enter "200" in the Value field.
-
Click Pick Colour and choose the colour that pipes are to be changed to.
for example:

Select Add Rule. The rule is added to the Rule set window as follows:

Save the rule settings and close the dialog by clicking Save.
On the AVEVA Colouring Utility dialog, click Apply. All drawings selected on the AVEVA Colouring Utility dialog are then copied to the specified output folder and re-coloured.
For example (note the pipes in the darker blue colour):
