Original Author: Gerd Eichler
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.
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.
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*
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*
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 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 to set the related property value’s default
False to leave the related property value’s default alone
*designates optional properties
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.
A spec break must be notified when a pipe run's specification is changed.
A page connector, valve, and inline flow element must be notified when a pipe run's name is changed.
A control valve's bubble must be notified when the control valve's device type code and number are changed.
A new pipe run's size should default to its pipeline's size
An instrument loop's instruments must be notified when the instrument loop's device type code and number are changed.