Measuring total length and width of building

Hi specialists!

I am currently attempting to make a dynamo script where I need to measure the length and width of the whole building. However, being a somewhat Dynamo greenhorn, I have no idea how to do this.

I tried to search Google, without luck.

Do you have any suggestions?

Kind regards,


Hi @pega

Welcome on Dynamo Forum!

Could you drop some screenshot or images showing the shape of your building. It would be better if you can drop the dummy rvt file showing the footprint of your building. Since your new user you can drop rvt file in google drive/dropbox and share the link here. Cheers!

1 Like

Hi Peter :slight_smile:

Could some kind of converting walls into lines and then take ‚Äėlargest perimeter‚Äô something be a solution? This is a subject frequently mentioned.
Similarly, if exterior walls always is marked as exterior, then could these walls be filtered. Combine that with orientation and that might give you something to continue your work. This last solution will however give the ‚Äėcorner‚Äô problem (wall lengths will give you gaps in corners), which bring me back to lines‚Ķ

Just some of the post concerning this matter:

1 Like

(I have removed the Dropbox link)

But here is a picture. I have not started on the Dynamo script yet, because i have no clue how to measure the lenght and width.

And thanks :slight_smile:

Get all the walls in your project. Obtain the coordinates and sort these coordinates by the X and Y values. The difference in X and the difference in Y will be the lengths of your building.
lengtes.dyn (24.2 KB)

1 Like

That is awsome. Thanks!

You need to take wall width into consideration… otherwise nice solution.

Taking only exterior walls would also help processing… add eventually additional filtering taking only those walls you need to evaluate further.

Exterior walls.dyn (7.1 KB)


In the previous post, Dynamo uses the Wall location lines to calculate the length and width of the building. So these measurements are not precise.
By converting the walls into solids and extract the points of those solids Dynamo calculates the exact measurements of the building.

You can filter the walls by Function (Exterior/Interior likeerfajo said) of by level, type, etc.
lengtes.dyn (31.1 KB)

1 Like

It might be faster to use the element’s bounding box directly, tho that’s assuming that your building is axis aligned:

Worth exploring a bounding box method to get the wall thickness included.

Should also be a little quicker and can be used to get height as well, though your Z2 value may want to be an integer from the average grade plane or some other value.

… aaaaaaand @Dimitar_Venkov beats me to it by minutes.


Thanks all for the help. It works :slight_smile: