How to enable Unique Tag for P&ID Specialty Items (Manual)

Refering to the post here, there are some questions on why the same tag can be assigned to two different specialty items (e.g. Strainer). 

So here's how AutoCAD P&ID works behind the curtain. First, it checks the database and see which type of object can have a unique tag. The table it is looking for is PnPTagEnlistedColumns. If you use SQL Management Studio, this is what you will see

So which means, only Equipment, Nozzles, Hand Valves, Instrumentation and Pipe Line Group can have unique tag. So how about our Specialty Items? Let's try to do this manually by editing the database.

First, go to PnPBase table and find the maximum PnPID value. In my case, it is 801

Then add a new row with the following information.

Let's break it down

  • PnPTagRegistry - Table which this row refers to
  • 3C44180A-2261-40A5-8361-0FE3B2D621F0 - A randomly generated GUID. Get one from guidgen.com
  • 802 - Next PnPID number
  • 635258251095330258 - The time this row is added. This data is only for reference. You can use any value from the previous row

Now go back to PnPTagEnlistedColumns and add a new row with the following information

Let's break it down

  • Tag - The column which it will check for uniqueness.
  • PnPID - The number which we just added to PnPBase table
  • PipingSpecialtyItems - The type of object (table) we want to be unique
  • PnPTagRegistry - Whatever it means

Now see what happens when I reopen the project and insert a duplicate tag

You have now successfully edited the database! If you ask, will it corrupt my database if I did anything wrong? Yes! Just remember not to delete anything and you'll be fine.


comments powered by Disqus