P&ID Customisation Utility
- Last UpdatedJan 30, 2025
- 4 minute read
The P&ID Customization Utility (PIDCustomizationUtility.exe) utility can be used to
customize AVEVA P&ID by extending existing functionalities.
(Note that the example screen shots below may not show the current versions of AVEVA
P&ID or AutoCAD.)
-
This utility is stored at the AVEVA P&ID installation directory, e.g.
(C:\Program Files\AVEVA\P&ID 12.2.SP3\Install\Exe"in .zip format (Aveva.PIDCustomizationUtility.zip).

-
To run a PIDCustomizationUtility project, proceed as follows:
-
Extract/unzip the AVEVA.PID.CustomizationUtility.zip folder.
-
Open the AVEVA.PID.CustomizationUtility folder

-
-
Double click on the project (visual C# Project file) file:
AVEVA.PID.CustomizationUtility_ACAD2025_x64.csproj
-
Change the references:
Select the Solution Explorer, then select References.
Note: Some items will be have an exclamation mark and yellow triangle icon. These references are unable to load.

Remove these references by accessing the right-click menu and selecting the Remove option.

Add references by accessing the right click menu and selecting the Add Reference option.

Load these references from the AutoCAD installation directory, for example, C:\Program Files\Autodesk\AutoCAD 2025.

Change the properties of newly added references by selecting them, right-clicking, and selecting Properties. In the Properties dialog, select the Copy Local option and change it to False.

-
Change project settings as follows:
Right-click on the project in the solution Explorer and select the Properties option.

Select the Build tab and change the Output Path to the AVEVA P&ID Installation directory.

Next, set the Debug properties. Select the Debug tab.
-
Select the Start external program option and enter the AutoCAD exe path:

-
Provide the command line arguments and the working directory for debugging the project:

-
-
Next, select the required configuration. Select the Build option from the menu bar, then select Configuration Manager and the setup the Debug configuration:


-
Compile the project as follows:
-
Right-click on the project in the solution explorer and select the Rebuild option. Save the solution.


-
Once the code is compiled successfully, press F5. This will execute the code and launch AutoCAD.

-
-
Change the AVEVA P&ID Project Administrator Settings:
-
Open the Project Administrator, select Miscellaneous node and select Settings.

-
Set the value of the USER_PIDCUSTOMIZATION directive to YES.

-
-
Debug the project.
-
Open the drawing in AUTOCAD.
-
Open the PIDCustomization.cs file from the solution explorer. Set a breakpoint in the code by selecting a line and pressing F9.
-
Debug the Insert functionality by setting the breakpoint as follows. Insert any block, for example, Equipment or Instrument, in the P&ID drawing.

After inserting the block, the breakpoint will then be hit.

-
Debug the Drawing Issue functionality by setting the breakpoint at the following location. Issue the drawing and the breakpoint will then be hit.

-
Debug the Selection functionality by setting the breakpoint at the following location. Issue the drawing and the breakpoint will then be hit.

Type "TestS" in the AutoCAD command prompt and press Enter. The breakpoint will then be hit.

The breakpoint will be hit and the user can then start debugging the code.

-
-
The Command line arguments for debugging in detail are as follows (this example is for AVEVA P&ID 12.2.SP3 running on AutoCAD 2025, amend as appropriate for your installation):
/S "C:\Users\Public\Documents\AVEVA\AVEVA P&ID\AVEVA12.2.SP3\Projects\SAM\AutoCAD\Projmet;C:\Users\Public\Documents\AVEVA\AVEVA P&ID\AVEVA12.2.SP3\Projects\SAM;C:\Program Files\AVEVA\P&ID 12.2.SP3\Install\AutoCad\Bin;C:\Program Files\Autodesk\AutoCAD 2025\Support;C:\Program Files\Autodesk\AutoCAD 2025\Fonts;C:\Program Files\Autodesk\AutoCAD 2025\Help;C:\Program Files\Autodesk\AutoCAD 2025\Express;" /nologo /ld "C:\Program Files\AVEVA\P&ID 12.2.SP3\Install\AutoCad\Bin\pidacad.arx"
...where SAM is the project profile.
Working directory:
C:\Users\Public\Documents\AVEVA\AVEVA P&ID\AVEVA12.2.SP3\Projects\SAM\