To Extend cells for Parametric Instruments



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

CONNECT Edition 10.11.++

Environment: Windows 10/11 (64-bit)
Area: Instruments
Subarea:  
Original Author:Joseph Gelacio


Background

A new "Safety Critical Element" property can be added to the instrument classes that allows to select "Yes/No" to indicate if the instrument is safety critical or not. It also has the ability to swap out the graphics with a different symbol to visually indicate that the instrument is safety critical.

The standard visual display can be extended with additional cells for Parametric Instrument components.

Below are the parts that constitute an extended cell.

  1. Cells
    1. Add new cells to the cell library or identify existing cells.
    2. Determine the origin of the cell. It is important in determining the offset.
    3. Place the origin at the center of the cell elements.
  2. Class
    1. Determine which Instrument class to use.
    2. Use the INSTRUMENT_PARAMETRIC class.
  3. Properties
    1. Identify existing or define new properties on Instrument class.
    2. Define "boolean" type properties.
  4. Custom Attributes
    1. Add the "ExtendedCellPropertyNames" custom attribute on the class to define which properties to use.
      <ExtendedCellPropertyNames xmlns="pid.01.08">
           <PropertyNames>
              <string>SAFETY_CRITICAL1</string>
              <string>SAFETY_CRITICAL2</string>
              <string>SAFETY_CRITICAL3</string>
           </PropertyNames>
      </ExtendedCellPropertyNames>
      
    2. Add the "ExtendedPropertyCell" custom attribute on the defined properties.
      <ExtendedPropertyCell xmlns="pid.01.08">
               <CellName>Triangle</CellName>
               <CellLibrary>Instruments.cel</CellLibrary>
               <XOffset>0.1</XOffset>
               <XDir>1</XDir>
               <YOffset>-0.1</YOffset>
               <YDir>1</YDir>
      </ExtendedPropertyCell>
      
    3. Add Category and Property Custom Attribute which are used for the property grid display and defaults.
      <Category xmlns="EditorCustomAttributes.01.03">
          <Standard xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
         <Name>SAFETY_CRITICAL_SECTION</Name>
         <DisplayLabel>Safety Critical Setting</DisplayLabel>
         <Description xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true" />
         <Priority>3750</Priority>
         <Expand>True</Expand>
      </Category>
      
      
      <BMF_PROP_CUSTOM_ATTRIBUTES xmlns="bmf.01.08">
         <DefaultValue>False</DefaultValue>
         <IsGraphical>True</IsGraphical>
      </BMF_PROP_CUSTOM_ATTRIBUTES>
      
      
    4. The following are Extended Cell Settings:
      SettingDescription
      Cell Library
      Cell Name
      X Offset
      X Direction
      Y Offset From Cell Origin
      Y Direction From Cell Origin
      Property SettingAfter placement, use the Property Pane.

See Also 

communities.bentley.com/.../how-to-add-the-reattach-instrument-bubble-and-annotation-option-in-the-openplant-pid