Style Rule

File Object Type

You can refer to this file object type in any formula, macro, module, or other script in Blockpad. You can use either its name or its full path:

  • To refer to it by name, use StyleRule (make sure the library Library.Docs.Objects is included with Include Libaries)
  • To refer to it by its full path, use Library.Docs.Objects.StyleRule

 

See also:


A Style Rule applies style properties to a group of objects. It helps to ensure consistent formatting across a file, and it saves time because you don't have to set properties manually.

Styles for anything

Style rules are similar to paragraph styles in Microsoft Word, layers in Autocad, or cells in Excel, but the style system is universal in Blockpad. You can create a style rule for any object type: dynamic expressions, sections, value cells, paragraphs, and more.

Style rules may apply inside a specific frame or across a whole file. They may apply to all objects of a certain type, to a range of table cells, or to specifically chosen objects. They may also have a condition filter to specify conditional formatting.

Create a style rule:
  1. Select Style>Manage Styles in the toolbar.
  2. Click the Add button in the window that appears.
  3. Choose an object type.
  4. Set property values.
  5. Close the Style Manager.

Notes:

  • Some styles don't take effect until formulas are recalculated (namely, Show Formula, Show Steps, etc.). To update, you can press F5 after changing style rule properties.
Apply conditional styling (conditional formatting) based on object type:
  1. Select Style>Manage Styles in the toolbar.
  2. Click the Add button in the window that appears.
  3. Choose an object type.
  4. Check Value condition.
  5. Enter a value condition, the style rule will apply only if the result is true.
    • Example: >10
  6. Set property values.
  7. Close the Style Manager.
Apply conditional styling (conditional formatting) to a range of cells:
  1. Select Style>Manage Styles in the toolbar.
  2. Click the Add button in the window that appears.
  3. Check Apply to table range.
  4. Type in the cell range (e.g. A3:A9, C:C, D3:E7).
  5. Check Value condition.
  6. Enter a value condition function, the style rule will apply if the result is true.
    • Example: <E4 + 10 in
  7. Set property values.
  8. Close the Style Manager.
Notes:
  • Value condition formulas can use the same features as filter formulas. For example, Or(<0, >10), Compatible(1ft), and IsError are all valid.
See also: