How to allow Empty Field or Null Value on Temperature/Pressure



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

CONNECT Edition 10.XX.XX.XX

Environment: Windows 10/11 (64-bit)
Area: Properties 
Subarea: 
Original Author:Fer Mykiel Gonzales, Bentley Global Technical Support


Background

When removing a value in a double property such as Temperature/Pressure, OPM reverts to a 0 value. A 0 value can be mistaken to be an accepted value for a double property (0°C for Temperature of 0 lbf for Pressure) which should not be the case. User should be able to modify the property to a null value or an empty field when necessary.

Steps to Accomplish

For this example, we will create a new property for the Equipment Class

1. Launch Bentley Class Editor

2. Open OpenPlant.01.08.ecschema.xml

3. Go to Equipment Class and go to the OPERATING_TEMPERATURE property

4. Change the TypeName to string

5. (optional, for properties with custom attributes related to units) Remove DisplayUnitSpecification and Unit Specification custom attributes

6. Open OpenPlant_3D.01.08.ecschema.xml and supplement it with OpenPlant_3D_Supplemental_Modeling.01.08.ecschema.xml and OpenPlant_3D_Supplemental_ModelingViews.01.08.ecschema.xml. (See How to Open Schema & Supplement it with desired Schema in Bentley Class Editor CONNECT Edition. - OpenPlant | AutoPLANT Wiki - OpenPlant | AutoPLANT - Bentley Communities)

7. Go to the Equipment Class

8. Go to Properties tab and Add new property 

9.  Add in necessary information for the Fields of the new property such as Name and DisplayLabel. Set the TypeName to be string.

10. Add the Custom Attribute Calculated ECProperty Specification.

11. Move the Calculated ECProperty Specification to OpenPlant_3D_Supplemental_Modeling.01.08.ecschema.xml.

12. Click OK in Add/Remove Custom Attribute dialog

13. Fill in the Fields in the Calculated ECProperty Specification as shown below:

14. Save All schema changes