How to add Open/Closed state display for Valves


How to add Open/Closed state display for Valves

Applies To 
Product(s):OpenPlant PID CE
Version(s):

10.10.xx.xx

Environment: Windows 7/8.1/10 (64-bit)
Area: Customization
Subarea: 
Original Author:
Enhancement Statement
 Ability to have open or closed state as a property of valve instead of having a different class.
Background
When the user places an open gate valve in PID he gets its equivalent from spec in OpenPlant Modeler. But when he places a closed gate valve in PID he does not get its equivalent from the spec as it is the same valve but spec is configured to place the records only for open gate valve.

Steps to Accomplish

This example will implement the solution on a Gate Valve.

  1. Open the class edit with OpenPlant_PID and supplement with OpenPlant_PID_Supplemental_Design schemas
  2. Navigate to the VALVE class and add a new property if it does no exist: VALVE_STATE (string)
    1. <ECProperty propertyName="VALVE_STATE" typeName="string" description="Define if the Valve state is open or closed" displayLabel="Valve State" />
  3. Navigate to the GATE_VALVE class and select the VALVE_STATE property
  4. Add a new Custom Attribute...: PROPERTY_BASED_CELL_NAMES

       5. Fill out properties with desired Opened and Closed state

<ECProperty propertyName="VALVE_STATE" typeName="string" description="Define if the Valve state is open or closed" displayLabel="Valve State">
    <ECCustomAttributes>
         <ExtendType xmlns="EditorCustomAttributes.01.03">
             <Name>PropertyBasedCells</Name>
         </ExtendType>
     <PROPERTY_BASED_CELL_NAMES xmlns="OpenPlant_CustomAttributes.08.11">
         <DEFAULT_CELL_NAME>HVALVE_GATE_OPEN</DEFAULT_CELL_NAME>
         <PROPERTY_MAPPING>
                <CELL_NAME_DEFINITION_STRUCTURE>
                     <PROPERTY_VALUE>Open</PROPERTY_VALUE>
                       <CELL_NAME>HVALVE_GATE_OPEN</CELL_NAME>
                </CELL_NAME_DEFINITION_STRUCTURE>
                <CELL_NAME_DEFINITION_STRUCTURE>
                       <PROPERTY_VALUE>Closed</PROPERTY_VALUE>
                            <CELL_NAME>HVALVE_GATE_CLOSED</CELL_NAME>
                  </CELL_NAME_DEFINITION_STRUCTURE>
          </PROPERTY_MAPPING>
       </PROPERTY_BASED_CELL_NAMES>
       <BMF_PROP_CUSTOM_ATTRIBUTES xmlns="bmf.01.08">
            <IsGraphical>True</IsGraphical>
       </BMF_PROP_CUSTOM_ATTRIBUTES>
   </ECCustomAttributes>
</ECProperty>

In use