OPPID - How to Customize the Pipeline Annotation


Applies To 
Product(s):OpenPlant PID
Version(s):08.11.10.XXX (SS5)
Environment: Windows 7/8.1/10 (64 bit)
Area: Customization
Subarea: 
Original Author:Gerd Eichler, Bentley Product Advantage Group

Background

In this process you will modify the existing annotation format for a process line (Pipeline) so that the annotation string will contain the Size, Line Number and Service. When complete the annotation string for a process line will format as 4"-1001-SW where Service is coming from the PIPELINE.object.

When a pipeline annotation is about to be placed and the user hovers over a pipe run then all of the annotation's properties that match a property of the pipe run object are synchronized. In the same way all properties of the annotation that have a PIPELINE_ prefix are synchronized with the corresponding porperties of the pipeline object.

The following descriptions use the ansi project of OpenPlant PowerPID.

Reviewing the existing pipeline annotation classes

  1. Start OPPID by selecting the ansi project and loading PID_Example.dgn

Placing an existing annotation 

  1. Place a pipeline
  2. In the Taskbar select the Annotation workflow and expand Pipeline annotations
  3. Click the 2nd annotation tool pipeline-size-spec and hover with the annotation string over the pipeline. The annotation string adopts the values from the specific pipe run.
  4. Place the annotation

Review the corresponding annotation class

  1. From the main menu select Utilities > Class Editor → The ECClassEditor is launched
  2. Open the schema OpenPlant_PID.01.02.ecschema.xml.
  3. Expand the class tree Annotation > Pipe Line Annotation  and select class Pipe Line Annotation alternate 1
  4. Select the class Pipe Line Annotation alternate 1. On the Properties tab select the property Pipe Line Annotation String.
  5. The property has the Calculated ECProperty Specification custom attribute that contains the annotation format.
  6. For class Pipe Line Annotation the format is:

    this.SIZE & "-" & this.NAME & "-" & this.PIPELINE_NAME

Create and customize a new pipeline annotation class

  1. Select the class Pipe Line Annotation and click the right mouse button
  2. from the context menu select the option Add Derived Class. A new class with the default name "Class" is created".
  3. Change the class name to "PIPE_LINE_ANNOTATION_ALT6" and the display label to "Pipe Line Annotation alternate 6" and click the Save button in the loer right corner.
  4. Select the properties tab.
  5. Click the Add button and select New. A new property is created
  6. Change the name of the new property to "PIPELINE_SERVICE" and the display label to "Pipeline Service" and click Save to save the changes.. By prefixing SERVICE with "PIPELINE_" you are telling the product to use the SERVICE from the PIPELINE and not PIPE RUN. Likewise if you wanted to add the Design Specification from the PIPELINE to the annotation string you would add a property named PIPELINE_SPECIFICATION.



  7. Select the Pipe Line Annotation String property and click the Overwrite button.
  8. Change the Calculated ECExpression to

    this.SIZE & "-" & this.PIPELINE_NAME & "-" & this.PIPELINE_SERVICE



  9. Click the Save button.
  10. Restart OPPID.
  11. From the main menu select Utilities > Keyin. The keyin dialogbox is displayed.
  12. Type the command "pid insert OpenPlant_PID PIPE_LINE_ANNOTATION_ALT6" and hit enter. The new annotation string is displayed on the cursor.
  13. Hover over a pipe run to adopt the values for the annotation.
  14. Place the annotation.

      

Add your newly created annotation to user tools for a quick reference

  1. Open PIDProjectSymbols.dgnlib file from your %project%\Dataset\dgnlibs\ folder
  2. In the top menu select Workspace->Customize
  3. Browse to the desired place (User Tools->Annotation->Pipeline Annotations)
  4. Copy one of the existing tools to easily modify it;
  5. Change the name and Key-in of the tool ("pid insert OpenPlant_PID PIPE_LINE_ANNOTATION_ALT6")
  6. Copy this tool to Tasks as well;
  7. Save and close the dgnlib file. Restart OPPID.

Notes:

  1. Properties from the Pipeline (PIPING_NETWORK_SYSTEM) must have the prefix “PIPELINE_
    1. PIPELINE_NAME
    2. PIPELINE_SERVICE
  2. Property types on the Annotation class must match the property types defined on the class in which they will annotate
  1. Property ‘MYSTRING’ defined as string on PIPING_NETWORK_SYSTEM (typeName="string")
  2. Property ‘PIPELINE_MYSTRING ’added to PIPE_LINE_ANNOTATION_ALT6 class must be defined as string  (typeName="string")
  3. Mismatched property types will result in annotation not evaluating correctly

Comments or Corrections?

Bentley's Product Advantage Group requests that you please confine any comments you have on this Wiki entry to this "Comments or Corrections?" section. THANK YOU!