Find suffix value for a given component data object in model tree
If the component_data is attached to a block within the
context (that is, part of the model hierarchy rooted by the
context BlockData), then Suffix components are
searched by traversing the model hierarchy in three passes:
Search for a Suffix matching the specific component_data,
starting at the root (context block) and descending down
the tree to the component_data. Return the first match
found.
Search for a Suffix matching the component_data’s
container, starting at the root and descending down the
tree to the component_data. Return the first match found.
Search for a Suffix with key None, starting from the
component_data and working up the tree to the root.
Return the first match found.
If the component_data is not part of the context hierarchy,
then only the Suffix attached to the root context is
checked for the component_data, its container, and None (in
order).
If no valid value is found by searching Suffix components,
then the default value is returned.
- Parameters:
component_data (ComponentBase) – Component or component data object to find suffix value for.
- Returns:
The value for Suffix associated with component data if found, else None.
- Return type:
Any