How to Calculate the Property Value With Help of EC Expression


Applies To
Product(s):OpenPlant Modeler
Version(s):08.11.09.XXX (SS5) | 08.11.11.XX (SS6)
Environment:Windows 7/8.1/10 (64 bit)
Area:Component
Subarea:Data
Original Author:Harpreet Singh, Bentley Product Advantage Group

Background

Requirement is to calculate the property value with the help of EC Expression. In this example, we will calculate a property based on formula using EC Expression on Directional Pipe guide.

Steps to Accomplish

  1. Launch class editor and load OpenPlant_Catalogue.01.07 schema. This schema is located in C:\ProgramData\Bentley\OpenPlantModeler V8i\WorkSpace\OPModeler\schemas folder.

  2. Go to AP_3D_COMPONENT_TABLE class as shown below.



  3. Right click and select Add Derived Class option from context menu.



  4. Name the class as AP_3D_DIRECTIONAL_PIPE_GUIDE as shown below.



  5. Switch to properties tab and add new property.



  6. Name the property GUIDE_LENGTH and change the property Type Name to "double" as shown below.



    Note: GUIDE_LENGTH is the column name in Spec Table.

  7. Add another property NOMINAL_SIZE and change the TypeName to "double".



  8. Save the changes in the schema and load OpenPlant_3D schema from your project schemas. This schema is generally located in C:\ProgramData\Bentley\OpenPlantModeler V8i\WorkSpace\Projects\%Project_Name%\Dataset\schemas folder.

  9. Go to DIRECTIONAL_PIPE_GUIDE class and switch to properties tab.



  10. Add new property BOX_TEST.



    Note: If you make this a "double property", you can do that by changing the TypeName field.

  11. Add custom attribute "OpenPlant_Physical_Catalogue_Property_Map" on this property.



  12. Right click on EC Expression field and select "Add Element" option.



  13. Add below expression in EC Expression field.

    COMPONENT_TABLE.NOMINAL_SIZE + (COMPONENT_TABLE.GUIDE_LENGTH*2)



  14. Save the changes and verify the result by placing directional pipe guide in the model.

See Also

communities.bentley.com/.../31184.how-to-get-inside-diameter-calculated-in-openplant-modeler

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!