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

AVEVA™ P&ID

PIDCustomizationUtility Class Description

  • Last UpdatedMar 14, 2024
  • 3 minute read

A PIDCustomizationUtility project contains two classes: PIDCustomization and Utilities.

PIDCustomization Class

This is a singleton class. Some if the class’s routines (methods) are called from the AVEVA P&ID application. However, this class can also be customized and more methods added.

The class has following properties and methods:

  • Properties: This class has following properties:

    • string ProjectName - stores the Project Name/Number

    • string DrawingID - stores the Drawing ID

    • string DrawingName - stores the Drawing Name

    • string MajorRevision - stores the Major revision field

    • string MinorRevision - stores the Minor Revision field

    • string Description - stores the Description field

    • string NameOfUser - stores the Name of User field

    • string ClientDwgNo - stores the Client Drawing No field

    • string RevisedBy - stores the Revised By field

    • string CheckedBy - stores the Checked By field

    • string ApprovedBy - stores the Approved By 1 field

    • string ApprovedBy2 - stores the Approved By 2 field

    • string ApprovedBy3 - stores the Approved By 3 field

    • string ClientApprovedBy - stores the Client Approved By field

    • byte[ ] DrawingData - stores the Drawing data in binary format

The above properties are specified using dialog below when the user issues any drawing in the AVEVA P&ID application.

Embedded Image (65% Scaling) (LIVE)

  • Methods: The PIDCustomization class has the following methods

    • GetInstance (): This is public static method used for getting an instance of a PIDCustomization class. An instance of this class cannot be created outside.

    • ProcessIssueDrawing (string strRecordId): This is a public method used for processing a drawing recently issued in the P&ID application. When the user issues any drawing in the P&ID application, this method gets called. This method takes the parameter strRecordId which holds a unique id for recently inserted Drawing Issue data in the SynchroniseDetails table of the database.

    • ProcessBlock (ObjectId BlockId): This is a public method used for processing a recently inserted block in a P&ID drawing. BlockId holds the recently inserted Block's ObjectId. When the user inserts any block into a P&ID drawing, this method gets called.

    • TestSelection (): This is a public static method used for the selection of an entity in a P&ID drawing. To use this method, the user needs to type "TestS" in the AutoCAD's command prompt.

    • SaveBinaryDrawing (): This is private method used for saving issued Drawing Data in binary format. Currently, this drawing data is stored in My Documents folder in ".dwg" format.

    • ReadDrawingDetails (string strRecordId): This is a private method used for reading all the drawing details from the SynchroniseDetails table for the current record id.

    • GetConnectionString (): This is private method used for getting the proper connection string to establish a connection for the database.

    • SetColorForEntity (ObjectId objIdBlockId, short iColor): This is a private method used for colouring a selected entity. ObjIdBlockId is the selected ObjectId of an entity and iColor is the colour index which is to be assigned to the selected entity.

    • GetRecordId (): This is private method used for getting a newly created record id from the SynchroniseDetails table.

Detailed Structure of the PIDCustomization Class

Embedded Image (65% Scaling) (LIVE)

Embedded Image (65% Scaling) (LIVE)

Utilities Class

This is static class and has only static members. This class is designed for holding SQL Server Details.

The class has following members:

  • strSQLServerName: holds Server Name details

  • strSQLWinAuthentication: holds SQL Windows Authentication

  • strSQLUserName: holds SQL user name

  • strSQLPassword: holds SQL Password

  • strSQLDatabaseName: holds SQL Database Name

  • strSQLAdminDatabaseName: holds SQL Admin Database Name

  • strSQLReportsDatabaseName: holds SQL Reports Database Name

Detailed Structure of the Utilities Class

Embedded Image (65% Scaling) (LIVE)

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