4.3.15.8. Style override mechanism

 
This topic explains IRM's drawing styling model, focusing on the different places where styles can come from, which can be:
  • individual objects such as Lines,
  • Blocks
  • components of Blocks
  • Block Shapes
  • Layers
 
In order to fully understand how style overrides work, it is important to understand the differences between Blocks, Block Shapes and their components as described in the following topic - Insert a Block into the Design World, as well as the basics of Decorative Drawing Objects, their properties and their Layers.
 
As drawing styles are often set via Layers, it is also important to have a good understanding of the IRM Layer system before reading this section. Layers are covered in detail in the main Layer Manager topic, while the Layer Manager UI and details regarding Layer precedence are covered in their own subsections.
 
 

Drawing objects Style override mechanism

 
For an individual object like a Line, styles are taken ("inherited") from the following places, listed in order of decreasing precedence:
  • from the Line object itself
  • from the Line's Layer
     
This means that a style in the Line object overrides the same style in the Line's Layer. However, other Layer styles that haven't been overridden will still be shown.
 
Observe this screenshot of a few different Decorative Drawing objects placed in the Design World, all of which are in the same Layer (the "General Architecture" Layer):
Notice how some of the objects are drawn in a similar style, like the large Square, Line and the Text object (black, thin, solid line), whereas the Arc has a quite different style (red, thick, dashed line). This is because the Arc has some overriding styles applied directly which take higher precedence than the associated Arc's Layer styles from the General Architecture Layer.
 
The Arc styles (and those of other Decorative Drawing objects) can be reviewed and changed using the Decorative Drawing Object Properties dialog:
 
In the above diagram, notice that the Line Thickness, Line Color and Dash Style property values are no longer being inherited by the layer on which the object is place allowing unique values to be set for these 3 fields of the drawing object.

To override any inherited layer property is done by choosing another value for a style property, which automatically un-checks the checkbox for that property under the Is inherited from layer column. As the name suggests, that column indicates whether the value for a style property is "inherited" from the object's Layer, or specified directly in this dialog.

Note:  When the Is Inherited from Layer option is checked, the drawing object will inherit its drawing properties from its associated layer.
 
In the case of the Arc object, its Layer information is available in the General Architecture tab in the Layer Manager dialog, which lists all Layers available for General Architecture objects. A drawing object is associated with exactly one General Architecture Layer and therefore, drawing object Layers do not have a precedence property like Managed Object Layers.

 

Current Drawing Layer and defining Layer Properties

The currently active drawing layer is used to specify which layer any new drawing objects ( Line, Text, Arcs, and Polygons) are placed and is specified by the radio button in the Current Drawing Layer column of the General architecture layer  tab
 
The button is to access the Style Editor and set the style properties of the selected layer:
This sub-dialog clearly shows the Drawing Styles that will be inherited by any object placed on this layer that has no style overrides applied. 
 
Note the above style rules and overrides only apply to all General Architecture / Drawing objects such as Lines, Arcs, Text, Polygons and Basic Block Shapes.
 
 

Block Shape Style override mechanism

For a Block Shape, styles are taken ("inherited") from the following places, listed in order of decreasing precedence:
  • from the component objects (or children) of the Block Shape's Block (Lines, Images, etc.)
  • from the Block Shape object itself
  • from the Block Shape's Block
  • from the Block Shape's Layer

 

Certain Block components, such as Images, cannot be styled -- that is, you cannot change the color of an Image in a Block by setting a style.  Other components, such as Lines, can be styled.
 
Let's imagine a very simple use case scenario in which a block shape exist which comprises of other shapes, for example a conference room desk and chair block shape has Chairs drawn on the Chars Layer which is read, and the Desk drawn on a different layer named Desk which has the magenta color assigned.  The chairs and desk are then combined into a single block shape.

When placing this Block shape it will always inherit its coloring from the underlying layers associated with its elements.


If the user was to change the Desks Layer color to Blue, then the block shape would appear as follows, as the Block Shape is still inheriting its colors from the underlying elements layer property settings:


However, if the user applies a style override for the block i.e. Color = Green, then all elements of the block will then inherit the style override value:

 
To summarize, the following rules regarding style override mechanism for Block Shapes apply:
  • if the Block has no styles and its children have no styles, the resulting Block Shape will use styles of the assigned Layer . You can override them by setting block shape's own styles.
  • if the Block has styles and children have no styles, the resulting Block Shape will override Layer styles with its own styles, because it receives initial styles from the Block. Those can be changed to change visual appearance, or can be set to inherit from Layer.
  • if  the Block's children have styles, those ultimately override all other options and can't be removed, disabled or overridden.