How to Map Spec Data for Double Type Property in OpenPlant Modeler



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: Settings
Subarea: -
Original Author:Deepak Singh,Bentley Product Advantage Group

Background

In OpenPlant Modeler, user’s requirement is to calculate property value from specification database with help of EC Expression. For example, to calculate Length whose data type is double for PIPE_ELBOW_TRIMMED class. Below wiki article will explain on fetching of calculated data from specification for a double type property.

Steps to Accomplish

  1. Using Bentley Class Editor, open OpenPlant_3D_XX.XX.ecschema.
  2. Supplement it with OpenPlant_3D_Supplemental_Modeling.XX.XX.ecschema & OpenPlant_3D_Supplemental_ModelingViews.XX.XX.ecschema schemas.
    For More information on supplementing schema click here>>>>
  3. Search for PIPE_ELBOW_TRIMMED class, switch to Properties tab & search LENGTH property
  4. Click on Override to localize this property.

  5. Click on Custom Attributes > Add/Remove to add a custom attribute.

  6. From Add/Remove Custom Attributes window, select OpenPlant_Physical_Catalogue_Property_Map custom attribute. Using drop arrow add selected custom attribute > Change Schema location to OpenPlant_3D_Supplemental_Modeling.XX.XX > OK. Refer below image.



  7. Under OpenPlant_Physical_Catalogue_Property_Map custom attribute, right click on ECExpression > Add Element



  8. Below are the possible cases to describe calculated length for Pipe Elbow trimmed class

Case 1: To Fetch Calculated Length for Pipe Elbow Trimmed Class from Specification Database when CTR_END_M property is available.

Sample Specification database

Calculated length for Pipe Elbow Trimmed class is sum of CTR_END_M & CTR_END_R or twice CTR_END_M or CTR_END_R. This calculation can be achieved by using arithmetic operator in ECExpression as shown below.

Using “+” operator

COMPONENT_TABLE.CTR_END_M+CTR_END_M


Using “*” operator

COMPONENT_TABLE.CTR_END_M*2

Case 2: With different available properties value for CTR_END_M & CTR_END_R, conditional operator can also be used for calculating calculated length.

When CTR_END_R is 0 & CTR_END_M is available.

Sample Specification database

Using Conditional Operator

IIF(COMPONENT_TABLE.CTR_END_R = 0, COMPONENT_TABLE.CTR_END_M*2, COMPONENT_TABLE.CTR_END_R*2)

Note: In specification database snapshot, EC_CLASS_NAME is showing as LONG_RADIUS_90_DEGREE_PIPE_ELBOW because in schema for PIPE_ELBOW_TRIMMED class Use EC Class as LONG_RADIUS_90_DEGREE_PIPE_ELBOW, PIPE_ELBOW_90_DEGREE_SHORT_RADIUS & PIPE_ELBOW_90_DEGREE_3R is defined. Refer image below.

  1. Implementing any of above EC_Expression will result same result.
  2. Save the changes & verify result as shown below.

See Also

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

See Video

communities.bentley.com/.../273171