How to Generate Equipment Tag Name With & Without Null Value in OpenPlant Modeler



Applies To 
Product(s):OpenPlant Modeler
Version(s):

08.11.11.XX (SS6)

Environment: Windows 7/8.1/10 (64-bit)
Area: OpenPlant Modeler
Subarea: Equipment
Original Author:Deepak Singh,Bentley Product Advantage Group

In OpenPlant Modeler, requirement is to include a property whose value can or can’t be null in equipment tag name.

Background

In OpenPlant Modeler, requirement is to generate tag name for equipment with or without null value to desired property. For example, equipment has tag name format like Device Type Code-Unit-Number-Suffix. In this case equipment can contain some input value to Suffix property or can be null. In either cases, equipment tag name should generate properly. Below wiki article explain the workflow to achieve such requirement in OpenPlant Modeler.

Steps to Accomplish

Case A: When a property has null value to expression

Using IIF statement, desired result can be achieved.

Format: IIF (IsNull(this.SUFFIX), expression1,exression2)

  1. Using Bentley Class Editor, open OpenPlant.01.07. ecschema
  2. Supplement OpenPlant.01.07 with OpenPlant_Supplemental_Tagging.01.07.ecschema of desired project schema.

    For More information on supplementing schema Click Here>>>>

  3. Navigate/Go to EQUIPMENT Switch to Properties tab & search NAME property as shown below.



  4. Scroll down & go to applied Calculated ECProperty Specification custom attribute. Update ECExpression as shown below.

    ECExpression: IIF (IsNull(this.SUFFIX), this.DEVICE_TYPE_CODE & this.UNIT & this.NUMBER , this.DEVICE_TYPE_CODE & this.UNIT & this.NUMBER & this.SUFFIX)



  5. Save all the schema changes & verify result in OpenPlant Modeler.

    Equipment Tag name when suffix has value



    Equipment Tag name when suffix is null


Case B: When more than one property has null value to expression

Using nested IIF, desired result can be achieved

Format: IIF (IsNull(Property1), Expression1, IIF (IsNull(Property2), Expression2, Expression3))

In this case two properties are null, suffix & stock number. Use below expression to generate desired tag name.

ECExpression: IIF (IsNull(this.SUFFIX), this.DEVICE_TYPE_CODE & this.UNIT & this.NUMBER , IIF(IsNull(this.STOCK_NUMBER),this.DEVICE_TYPE_CODE & this.UNIT & this.NUMBER, this.DEVICE_TYPE_CODE & this.UNIT & this.NUMBER & this.SUFFIX & this.STOCK_NUMBER))

Save all the changes & verify result in OpenPlant Modeler.

Equipment Tag name when suffix has value



Equipment Tag name when suffix is null

See Also

stage-communities-bentley2-com.telligenthosting.net/.../how-to-add-new-existing-property-to-nozzle-manager-dialog-in-openplant-modeler

See Video

stage-communities-bentley2-com.telligenthosting.net/.../273474