Startup scripts

In the Project Environment dialog, in [library or project] > Diagram > Startup Scripts, administrators can manage startup scripts that are used by the P&ID application.

When creating a new diagram in the P&ID application, the designer selects the sheet that the diagram is to use, and if there is a start-up script for that sheet, then the script initializes certain settings for the new diagram. A start-up script can define, for example, the following:

  • Defines the sheet size.

  • Loads decorations such as border lines.

    Usually the start-up script calls the "sheets" script described in 'sheets' script to set 2D decorations to the sheet.

  • Sets up grid attributes and cut parameters.

  • Defines the title box label and its initial contents.

  • Loads currently existing Systems, Pipelines, and Instrument Tags from the database into the diagram.

However, it is also possible to create diagrams that do not use a start-up script.

Example

In the following example code, the items that typically are to be configured are shown in bold text.