
| | | |
| Applies To | | |
| | | |
| Product(s): | AutoPLANT P&ID | |
| Version(s): | | |
| Environment: | N/A | |
| Area: | N/A | |
| Subarea: | N/A | |
| Original Author: | bmoberg, Bentley Technical Support Group | |
| | | |
Overview
This Technical Bulletin will describe how to define Revision History in a custom border to be used in AutoPLANT P&ID drawings. AutoPLANT P&ID was not designed to support Revision History in its borders as attributed tokens. The steps below include a customization to the software code to support this new functionality.
Step One – Project Administration Modifications/Additions. - Project Administrator
- In Project Administrator browse to the Project>Database>Databases>Projdata and set AutoPLANT P&ID and Project Administrator as a Registered Application for the Doc_Rev table as shown below:


- Add Revision fields to the AT_DWG_NAME System Query. This is the query that controls what data is passed between the project database and the AutoPLANT P&ID border. Any fields to be assigned to a border token must first be added in this view.
- In Project Administrator browse to the Project>Database>Databases>AT_Views
- Select AT_DWG_NAME view and select the Edit button.
- Select the Joins tab and add the Doc_Rev table using the Doc_id to Doc_id join as shown below:

- Save and Exit to write the changes to the database schema.
- Edit the AT_DWG_NAME view again and this time select the Fields tab. Select the fields you want to be tokens for the Revision section of the border as shown below:

- Save and Exit Project Administrator.
Step Two: Modification of the Border AutoCAD Block.
Add new customized Revision Attributes to border. Notice the new format.
REV:1 = Token to pull the REV value for the 1st revision.
REV:1,ORD:1,REV_BY:1 – First Revision
REV:2,ORD:2,REV_BY:2 – Second Revision
REV:3,ORD:3,REV_BY:3 – Third Revision

Step Three: Add lisp code to pid-sup.lsp.
- Browse to and open the Pid-sup.lsp file located in the following path:
C:\Documents and Settings\All Users\Application Data\Bentley\Plant V8i\P&ID\
- Search for the “Drawing Initialization” section and place the code directly above this section as shown below:
Custom Code goes here…
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;;;
;;; Drawing initialization
;;;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
Click the link below to view the custom AutoCAD Lisp functionality to be added to the Pid-sup.lsp file. Right click the link to download and save the file.
Lisp code for Revision History in Custom Borders
See Also
Plant TechNotes And FAQs
Product TechNotes and FAQs
External Links
Bentley Technical Support KnowledgeBase
Bentley LEARN Server
Comments or Corrections?
Bentley's Technical Support Group requests that you please submit any comments you have on this Wiki article in the "Comments" area below. THANK YOU!