ECExpression Examples
The following table represents some common examples of ECExpressions that are supported in PlantSight:
ECExpression | Type of Expression | Example |
GetRelatedInstance | this.GetRelatedInstance | this.GetRelatedInstance("PLANT_AREA_HAS_NAMED_ITEM:1:PLANT_AREA").NAME |
Nested GetRelatedInstance | this.GetRelatedInstance("SEGMENT_HAS_PIPING_COMPONENT:1:PIPING_NETWORK_SEGMENT").GetRelatedInstance("PIPELINE_HAS_SEGMENT:1:PIPING_NETWORK_SYSTEM").PLANT_AREA | |
System.String | System.String.Substring | System.String.Substring(this.DESCRIPTION,0,3) |
System.String.Format | System.String.Format("{0:D3}", this.DRY_WEIGHT) | |
System.String.Compare | System.String.Compare("HEIGHT", "LENGTH") | |
IIF statements | IFF Statements | IIF(this.FLOW_RATE=0,this.MAXIMUM_PRESSURE,this.FLOW_RATE) |
Nested IIF Statements | IIF(this.FLOW_RATE=0,this.MAXIMUM_PRESSURE,IIF(this.FLOW_RATE=10,this.MAXIMUM_PRESSURE,this.FLOW_RATE)) | |
Mathematical expressions | /,*,+.- | (this.ELEVATION + this.DRY_WEIGHT) |
Expression applied on properties other than Name | Expression applied on ALIAS Property | this.DESCRIPTION |
For more information about ECExpressions and the Expression Editor, see"Expression Editor" OpenPlant Project Administrator Help.