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,

Peter

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

(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!

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.

2 Likes

Thanks all for the help. It works :slight_smile: