# How to Calculate Brickwork Dimensions Automatically in Revit

Designing buildings with masonry is a common method used in different countries. The challenge with masonry, however, is to find the right dimensions for your wall so you only end with full or half bricks.

With Revit, we can solve this issue by setting the units of the half or full-size bricks in the early designing part. This way we avoid a lot of unnecessary cutting of bricks and waist. Also, you want to prevent the bricklayer from filling up the masonry with too small bricks, or too thick joints.

This article will show you how to use Dynamo Revit to create a check for coordinated masonry dimensions. The focus of this article will lay on the horizontal measurements of masonry.

## Standard brick sizes

If we talk about brick sizes, we can say that there are a lot of different variants all over the world. Each country has its standard brick sizes. In the table below you can see an example of the most common standard brick size per country. For the explanation of the Dynamo Script, we focus on the UK standard brick size.

Most standard bricks are modular. This simply means that the length of a brick (stretcher) is equal to twice its width (header) plus 10mm for a mortar joint. The picture below shows an example of the UK standard brick size ((102,5mm * 2) + 10) = 215mm.

### Brick bonds

At the start of designing a building, an architect should start thinking about a pattern for the bricks. Bricks can be designed with a lot of different patterns. In the early stage of engineering, take into consideration the sizing of the masonry to avoid a lot of cutting bricks. The table below will give an example of some common brick bonds used by different countries.

• Stretcher bond
• Wild bond
• Stack bond (stretcher or header)

Stretcher bond

The stretcher bond is made with courses laid as stretchers with the mortar joint falling in the midway of the course above or below. This is a very popular bond because it’s very effective in saving time and costs (less brick cutting).

The header bond is made with courses laid as headers with the mortar joint falling in the midway of the course above or below. This pattern is used a lot for building cellars and fortifications in the past. Furthermore, this pattern can be used to create a radial in the masonry because the headers are smaller than the stretchers.

Wild bond

The wild bond is made without any pattern, so this pattern is in a random formation. The mortar joints are not allowed to be aligned.

The stack bond is made with vertical or horizontal stacks. The bricks may not be overlapping each other. You can find this pattern mostly as a decorative part of a building, because of its arrangement it is weaker than other bonds. To stabilize the bonding, it is recommended to use bed-joint reinforcements every three layers.

## Brickwork dimensions

As you can see there are a lot of different brick sizes and bonds. It is time to get more into the depth of the modular size. For this explanation, we focus on the standard UK brick size (215 x 102,5 x 65mm).

In the UK they speak of Co-ordinating brick size, which can be determined by one of three conditions.

1. CO-
2. CO
3. CO+

### 1. CO-

A brick without a mortar joint can be described as `(x)B-J` (x = amount of brick headers). CO- can be used with brick piers or panels between openings.

### 2. CO

A Brick with 1 mortar joint can be described as `(x)B`. CO can be used with external to internal corners of the masonry. Another example could be a part of masonry that will be placed backward a few millimeters.

### 3. CO+

Brick with 2 mortar joints, can be described as `(x)B+J`. CO+ can be used for openings such as doors and windows.

Tip

Wherever possible, it would be the best practice for engineers/architects to set out the brick dimensions with coordination. By following this advice you will circumvent the need for unsightly and unnecessary cutting bricks.

## Dynamo – Brickwork dimensions

To put the coordinated brickwork dimensions into practice, we can use a script with the help of Dynamo Revit and a part of Python code inside of Dynamo. With this script, you can check your dimensions with brickwork-coordinated dimensions. This tool can also be used inside the execution drawing to show the bricklayer how many bricks he needs to use. The output will be text below the dimension lines.

### Dynamo – Script

Below you will see an overview of the Dynamo script. I have divided the script into three parts to make clear what each part does. The script contains a part that is made in Python.

The script requires the installation of the following packages:

• Clockwork for Dynamo 2.x
• Spring nodes

### 1. Get Sheets/Views

This part of the script will check if there is a single view or multiple views on the sheet that you have opened. This means you can put the brickwork dimensions to multiple views at once if preferred.

### 2. Get dimension and filter

After the views are collected in part 1, the script will collect all dimension lines inside the view(s). For this, we are going to use the following Python script.

```import clr
from Autodesk.DesignScript.Geometry import *
#Import DocumentManager
import RevitServices
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
#Import RevitAPI
import Autodesk
#Import ToDSType(bool) extension method
import Revit
from Autodesk.Revit.DB import *
from Autodesk.Revit.Creation import *
clr.ImportExtensions(Revit.Elements)
clr.ImportExtensions(Revit.GeometryConversion)
# The inputs to this node will be stored as a list in the IN variables.
doc = DocumentManager.Instance.CurrentDBDocument
uidoc = DocumentManager.Instance.CurrentUIApplication.ActiveUIDocument
views = UnwrapElement(IN[0])
dimensionsperview = list()
TransactionManager.Instance.EnsureInTransaction(doc)
# Collect dimensions in Views
for v in views:
dimensions = list()
colldimension = FilteredElementCollector(doc, v.Id)
filtdimension = ElementCategoryFilter(BuiltInCategory.OST_Dimensions)
dimensions = colldimension.WherePasses(filtdimension).ToElements()
dimensionsperview.append(dimensions)

doc.Regenerate()
uidoc.RefreshActiveView()
OUT = dimensionsperview```

If you add a filter to the Type Name of the Linear Dimension Style, you can filter the dimensions and only put the text under the lines you want. In this example, I gave the Linear Dimension Style a Type Name: LB_brickdimensions_1.8mm.

### 3. Brick header size – set text

At this part, we know which views contain dimensions and which dimensions contain the filter to collect. Now we can put the filtered dimensions into the last part of the script.

The script requires a few variables that are already set. An important one is the brickheaderM in line 16. This is the brick header size and has to be modular, as explained before. For example, for the Dutch standard brick size of 210 x 100 x 50mm, it will be 100mm (Length – Joint) / 2)).

```# Load the Python Standard and DesignScript Libraries
import clr
import RevitServices
import math
from Autodesk.DesignScript.Geometry import *
from RevitServices.Persistence import DocumentManager
from RevitServices.Transactions import TransactionManager
doc = DocumentManager.Instance.CurrentDBDocument
# The inputs to this node will be stored as a list in the IN variables.
dimlines = UnwrapElement(IN[0])
# Variables
jointM = 10
ftmmconversion = 304.8
brick_text = []
# Methods
def round_off_rating(number):
return round(number * 2) / 2
value_mm = round_off_rating(dim.Value * ftmmconversion)

if value_mm % brickwork_headersize == jointM:
elif value_mm % brickwork_headersize == 0:
result = str(int(math.ceil(value_mm / brickwork_headersize))) + "B " + str(additional_measurement) + "R"
else:

dim.Below = result
return result

TransactionManager.Instance.EnsureInTransaction(doc)
for dims in dimlines:
if dims.Value == None:
form = []
for dim in dims.Segments:
brick_text.append(form)
else:
form = []
brick_text.append(form)
# Assign your output to the OUT variable
OUT = brick_text```

The output of the script will be a text below each dimension segment. The outcomes can exist of five different types.

1. (x)B-J
2. (x)B
3. (x)B+J
4. (x)B-(y)R
5. (x)B+(y)R

The last two (4 and 5) will show if a dimension is not a coordinated brickwork dimension. In that case, you see an additional measurement with the letter R as a suffix for Remaining. This will indicate how much length you have to solve by cutting bricks or making thicker mortar joints. The challenge is to end with full or half bricks of course.

## Wrapping Up

Coordinated brickwork dimensions are a great way to set up a building with masonry. This can only be done with modular brick sizes and the use of a 10mm mortar joint. The dynamo script will check every dimension segment for you and show if it is fitting to the modular brickwork size.

I hope this article helped you to understand the coordinated brickwork dimensions, and how to check them automatically with the help of a Dynamo script. If you have any questions, just drop a comment below.

## Get more stuff like this

Revit, Dynamo, Sketchup and BIM Tips

I hate spam too, so you can unsubscribe at any time.

### 6 thoughts on “How to Calculate Brickwork Dimensions Automatically in Revit”

1. Very helpfull! Saves a lot of time

2. Have you had any issues when modifying this check for modular blockwork (390x190x190)? I imagine the same principles should still work as width and depth area modular?

• If the length of a brick is equal to twice its width plus a 10mm mortar joint, then you can use this script. However, you need to change the values inside the Python script. In your particular case, the calculation would be (190*2)+10, which equals 390. This means that it is a modular value and can be used.

3. Hi, Thanks for providing this guide. I have followed the steps detailed above but keep getting an error on the List.FilterByBoolMask. The error text is below.