

Original Author: Gerd Eichler
Introduction
This example explains how to propagate property values from one component to a related component. Example Project Administrator requirements will given along with the information to accomplish them.
Description of the custom attribute
The BMF_NOTIFY_RELATED_COMPONENT_OF_PROPERTY_VALUE_CHANGE custom attribute is placed on a property. It holds an array of BMF_NOTIFY_RELATIONSHIP structures. The table below describes the properties of this structure.
Property Name | Value Type | Description |
RELATIONSHIP_CLASS_NAME
|
text
|
Relationship class name, in which this component is either source/target
|
NOTIFY_TARGET
|
True/False
|
True to notify target of relationship
False to notify source of relationship
Defaults to true
|
RELATED_CLASS_NAME*
|
text
|
Used to filter down the classes that get updated. If not filled out all items of the related type will be updated
|
RELATED_CLASS_PROPERTY_NAME*
|
text
|
Property Name of a Related Class that will be updated as result of this property change. This is only required if the property names differ.
|
CASCADE_PROPERTY_VALUE_CHANGE*
|
True/False
|
True to cascade the changed property value to the related property value.
False to only set related property value if no default
Defaults to False
|
SET_DEFAULT_PROPERTY_VALUE*
|
True/False
|
True to set the related property value’s default
False to leave the related property value’s default alone
Defaults to False
|
*designates optional properties
Definition:
Source relates to target, ex. RUN_HAS_IN_RUN. The relationship source is the component on the left side. The relationship target is the component on the right side. If you think of it as a sentence, the source is the subject. Pipe run is the source and valve (an in run) is the target.
Using required notification properties
Spec Break
A spec break must be notified when a pipe run's specification is changed.
- Edit the project schema, ex OpenPlant_PID.01.02.ecschema.xml.
- Find the PIPING_NETWORK_SEGMENT class
- Add the BMF_NOTIFY_RELATED_COMPONENT_OF_PROPERTY_VALUE_CHANGE custom attribute to the SPECIFICATION property.
- Fill in the BMF_NOTIFY_RELATIONSHIPS
- A spec break behaves like data change component. The DATA_CHANGE_CONNECTS_TO_RUN relationship relates spec breaks, reducers, etc to a pipe run.
- Add a BMF_NOTIFY_RELATIONSHIP entry
- Set the RELATIONSHIP_CLASS_NAME to DATA_CHANGE_CONNECTS_TO_RUN.
- Since this property is on the run, the spec break is the source of the relationship; set NOTIFY_TARGET to False.
Page Connector
A page connector, valve, and inline flow element must be notified when a pipe run's name is changed.
- Edit the project schema, ex OpenPlant_PID.01.02.ecschema.xml.
- Find the PIPING_NETWORK_SEGMENT class
- Add the BMF_NOTIFY_RELATED_COMPONENT_OF_PROPERTY_VALUE_CHANGE custom attribute to the NAME property.
- Fill in the BMF_NOTIFY_RELATIONSHIPS
- A page connector behaves like an end run component. The END_RUN_CONNECTS_TO_RUN relationship relates page connectors, blind flanges, caps, etc to a pipe run.
- Add a BMF_NOTIFY_RELATIONSHIP entry
- Set the RELATIONSHIP_CLASS_NAME to END_RUN_CONNECTS_TO_RUN.
- Since this property is on the run, the page connector is the source of the relationship; set NOTIFY_TARGET to False.
- Valve and inline flow elements behave like an in run component. The RUN_HAS_IN_RUN relationship is used for these.
- Add a BMF_NOTIFY_RELATIONSHIP entry
- Set the RELATIONSHIP_CLASS_NAME to RUN_HAS_IN_RUN.
- Since this property is on the run, the valve is the target of the relationship; set NOTIFY_TARGET to True.
Using optional property name and cascading notification properties
Notify Control Valve Bubble
A control valve's bubble must be notified when the control valve's device type code and number are changed.
- Edit the project supplemental schema, ex OpenPlant_PID_Supplemental_Imperial.01.01.ecschema.xml.
- Find the INSTRUMENT class
- Add the BMF_NOTIFY_RELATED_COMPONENT_OF_PROPERTY_VALUE_CHANGE custom attribute to the DEVICE_TYPE_CODE property.
- Fill in the BMF_NOTIFY_RELATIONSHIPS
- A control valve behaves like an in run component. The RUN_LINK_HAS_BUBBLE relationship relates page connectors (END_RUN), control valves (IN_RUN), pressure safety valves (DATA_CHANGE), etc to a bubble.
- Add a BMF_NOTIFY_RELATIONSHIP entry
- Set the RELATIONSHIP_CLASS_NAME to RUN_LINK_HAS_BUBBLE.
- Since this property is on the control valve, the bubble is the target of the relationship; set NOTIFY_TARGET to True.
- The value of device type code is annotated by the bubble's text1 property. Set RELATED_CLASS_PROPERTY_NAME to TEXT1.
- Whenever the control valve's device type code changes, the bubble's annotation of it should also change. Set CASCADE_PROPERTY_VALUE_CHANGE to True.
- 5. Add the BMF_NOTIFY_RELATED_COMPONENT_OF_PROPERTY_VALUE_CHANGE custom attribute to the NUMBER property.
- Fill in the BMF_NOTIFY_RELATIONSHIPS
- A control valve behaves like an in run component. The RUN_LINK_HAS_BUBBLE relationship relates page connectors (END_RUN), control valves (IN_RUN), pressure safety valves (DATA_CHANGE), etc to a bubble.
- Add a BMF_NOTIFY_RELATIONSHIP entry
- Set the RELATIONSHIP_CLASS_NAME to RUN_LINK_HAS_BUBBLE.
- Since this property is on the control valve, the bubble is the target of the relationship; set NOTIFY_TARGET to True.
- The value of number is annotated by the bubble's text2 property. Set RELATED_CLASS_PROPERTY_NAME to TEXT2.
- Whenever the control valve's number changes, the bubble's annotation of it should also change. Set CASCADE_PROPERTY_VALUE_CHANGE to True.
Default Pipeline Size
A new pipe run's size should default to its pipeline's size
-
Edit the project supplemental schema, ex OpenPlant_PID_Supplemental_Imperial.01.01.ecschema.xml
-
Find the PIPING_NETWORK_SYSTEM class
-
Add the BMF_NOTIFY_RELATED_COMPONENT_OF_PROPERTY_VALUE_CHANGE custom attribute to the DESIGN_SIZE property.
-
Fill in the BMF_NOTIFY_RELATIONSHIPS
-
PIPELINE_HAS_SEGMENT relates a pipeline to the pipe run.
-
Add a BMF_NOTIFY_RELATIONSHIP entry
-
Set the RELATIONSHIP_CLASS_NAME to PIPELINE_HAS_SEGMENT.
-
Since this property is on the pipeline, the pipe run is the target of the relationship; set NOTIFY_TARGET to True.
-
The pipeline's design size property equates to the pipe run's size property. Set RELATED_CLASS_PROPERTY_NAME to SIZE.
-
Whenever the pipeline's design size code changes, you do not want all of its pipe run sizes changing. Set CASCADE_PROPERTY_VALUE_CHANGE to False
Using optional related class and cascading notification properties
Notify intruments in a loop
An instrument loop's instruments must be notified when the instrument loop's device type code and number are changed.
-
Edit the project supplemental schema, ex OpenPlant_PID_Supplemental_Imperial.01.01.ecschema.xml.
-
Find the INSTRUMENT_LOOP class
-
Add the BMF_NOTIFY_RELATED_COMPONENT_OF_PROPERTY_VALUE_CHANGE custom attribute to the DEVICE_TYPE_CODE property.
-
Fill in the BMF_NOTIFY_RELATIONSHIPS
-
The LOOP_HAS_COMPONENT relates an instrument loop to all of its components, instruments, instrument lines, etc.
-
Add a BMF_NOTIFY_RELATIONSHIP entry
-
Set the RELATIONSHIP_CLASS_NAME to LOOP_HAS_COMPONENT.
-
Since this property is on the instrument loop, the instrument is the target of the relationship; set NOTIFY_TARGET to True.
-
Component includes all components. We only need this information passed to instruments. Set RELATED_CLASS_NAME to INSTRUMENT.
-
Whenever the instrument loop's device type code changes, the instrument's device type code should also change. Set CASCADE_PROPERTY_VALUE_CHANGE to True.
-
5. Add the BMF_NOTIFY_RELATED_COMPONENT_OF_PROPERTY_VALUE_CHANGE custom attribute to the NUMBER property.
-
Fill in the BMF_NOTIFY_RELATIONSHIPS
-
The LOOP_HAS_COMPONENT relates an instrument loop to all of its components, instruments, instrument lines, etc.
-
Add a BMF_NOTIFY_RELATIONSHIP entry
-
Set the RELATIONSHIP_CLASS_NAME to LOOP_HAS_COMPONENT.
-
Since this property is on the instrument loop, the instrument is the target of the relationship; set NOTIFY_TARGET to True.
-
Component includes all components. We only need this information passed to instruments. Set RELATED_CLASS_NAME to INSTRUMENT.
-
Whenever the instrument loop's number changes, the instrument's number should also change. Set CASCADE_PROPERTY_VALUE_CHANGE to True.