08.11.09.XXX (SS5) | 08.11.11.XX (SS6)
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.
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 “*” operatorCOMPONENT_TABLE.CTR_END_M*2
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.