How to Display Fractional Imperial Pipe Sizes as Fractions in OPM



Applies To 
Product(s):OpenPlant Modeler CONNECT Edition
Version(s):10.11.00.260
Environment: Windows 11 (64-bit)
Area: Pipe Sizes
Subarea:  Schema Customization
Original Author:Sameer Bagwan, Bentley Global Technical Support


Background

This document explains the configuration changes required to have the fractional pipe sizes in an imperial WorkSet display as fractional pipe sizes. Currently the size properties in OpenPlant Modeler (OpenPlant_3D schema) are of type DOUBLE. This means the sizes will display as decimals only. If a pipe size that is a fraction of a whole pipe size is placed, the size will read as a decimal. Out of the box, a pipe size of 1-1/2” will display as 1.5in. This procedure configures the size, so it displays as 1-1/2”. A further example, a ¾” pipe will display as ¾” instead of 0.75in.

User will use the existing property, NOMINAL_SIZE and create a new property to hold the correctly formatted results.

NOTE: This was performed using the v8i version of the Bentley Class Editor. This will allow user to add an ECExpression Symbol Set so user can use System.String. User can use the CONNECT Edition Class Editor, but it will require the use of Text Editor to manually add the Symbol Set entry in the schema.

Steps to Accomplish

   A. Converting the NOMINAL_DIAMETER Property to a String from a Double

   To start, user will need to convert the NOMINAL_DIAMETER property from its delivered Double type to a String type. This will remove the default Units extension from the property.

  1. Click on the NOMINAL_SIZE property and click Override.
  2. Launch the Bentley Class Editor and load the OpenPlant_3D schema located in the “…\OpenPlant CONNECT Edition\Configuration\WorkSpaces\<User Workspace Name>\WorkSets\<User WorkSet Name>\Standards\OpenPlant\Schemas” directory.
  3. Supplement the schema with the OpenPlant_3D_Supplemental_Modeling schema.
  4. Browse to and click on the PIPE class. Click on the Properties tab.
  5. Click Custom Attributes… Add/Remove…
  6. Add a Calculated ECProperty Specification custom attribute. Add this to the OpenPlant_3D_Supplemental_Modeling schema.
  7. Right click on the Required ECExpression Symbol Sets field and then click Add element.
    In the field enter in System.String.


  8. Fill in the ECExpression field with the following expression.
    String.ToString(this.NOMINAL_DIAMETER) & “’’”
  9. This will grab the NOMINAL_DIAMETER property, convert it to string and store the result on NOMINAL_SIZE property.

    NOTE: In the expression, after the &, the correct syntax is Double Quote, followed by two Single Quotes, closed in with a Double Quote. This format is critical, so user get the inch marks (“) after the converted size. “’’”
  10. Click in the Is calculated as default value only field and select False. Continue and click in the Use the last valid value on failure and select True.
  11. Save the schemas.

   B. Adding a New Property to Hold the Corrected Size and Unit Value

   In this section, user will add a new property to hold the resulting string for the fractional pipe sizes. This property will provide user with a pipe size value that can be used in annotation and properly display the size       when it has a fraction and all sizes with the inch marks. This will require the creation of a nested IIF statement.

  1. Continuing in the OpenPlant_3D schema, and on the PIPE class, click on the Properties tab.

  2. Click Add… and when prompted, create the new property as shown below.

    NOTE: User can name the property as user like.

  3. With the property now added, click Custom Attributes Add/Remove…

  4. Add a Calculated ECProperty Specification, Category, and Property Display Status custom attributes. Make sure to place the Calculated ECProperty Specification custom attribute in the OpenPlant_3D_Supplemental_Modeling schema.

  5. Fill in the Category, and Property Display Status custom attributes as shown below. (The next step will address the new ECExpression.)
  6. Enter the following expression in the Calculated ECProperty Specification custom attribute, and on

    the ECExpression field.

    IIF(this.NOMINAL_SIZE="0.25''", "1/4''", IIF(this.NOMINAL_SIZE="0.5''", "1/2''", IIF(this.NOMINAL_SIZE="0.75''", "3/4''", IIF(this.NOMINAL_SIZE="1.25''","1-1/4''", IIF(this.NOMINAL_SIZE="1.5''","1-1/2''", IIF(this.NOMINAL_SIZE-"2.5''","2-1/2''", IIF(this.NOMINAL_SIZE="3.5''","3-1/2''", this.NOMINAL_SIZE)))))))

    NOTE: For the actual inch marks use two single quotes. Seen in RED above.

  7. Fill in the Is calculated as default value only and Use the last valid value on failure with False and True, respectively.
  8. Save the schemas.

   C. Testing the Configuration Changes

   Now that user have the configuration complete, user need to test and verify the results.

  1. Launch OpenPlant Modeler.
  2. Create a new model.
  3. Once the model loads, create a new Pipeline complete with a value for Unit, Service, and Plant Area. Assign a size. Set the size to 1.5
  4. Execute the Pipe tool.

 

Still a Problem?

If above problem still persists, then please create a Service Request and contact the Bentley Product Advantage group.  Please include a list of all relevant details to get in depth analysis for a solution or workaround.