Area perimeter lengths from Area Boundry lines



So I have exhausted all I know and can find to accomplish getting the PROPER lengths from Areas. I am trying to get the length for each side (perimeter lengths). I thought I succeeded but when looking at the lengths it is returning the overall length since the area boundry line is drawn as one long segment. See image below…

Any suggestions on how to get the individual lengths from the area boundry lines??

In my head I want to remove points not adjacent to the area and have Dynamo remeasure the length given two new points. See image on available data.
Doing this is above my head and any suggestions would help.

Or is it possible to get to the length values in revit that determine the perimeter using python?

Area boundaries incomplete
Perimeter of building

You could try recreating the geometry by using the element.geometry node and then pull out the individual parts.


I attempted that path and I created the geometry… then tried to deconstruct it. In the deconstruction say for room 1 in the image above it would still give me two segments on the south area line as it remembered that that line is constructed from two segments, although it is one area boundary line. I thought the same thing. As I made geometry it would forget and when the geometry was composed it would return a length of the geometry sides, not the segments it is composed from.


You’ll need to merge the co-linear lines so they become one line in Dynamo rather than two. It’s some work. There are some math resources on line that will help.

Basically, if you take any 3 consecutive points along the perimeter (clockwise/counter-clockwise doesn’t matter as long as you stay consistent) and check the area of a triangle that would be formed by those points, the points that are co-linear will have an area of zero. You can then remove the middle point and run it again, and again, and again.


Thanks for the suggestion… I am heading down the path of trying to identify area boundary lines that are not apart or show up twice for the areas. I can then possibly use the perimeter values as well as the lengths of the non adjacent lines to determine the other sides length. I am half way there so this may have holes in it.


I think that would only work if you had rectangular spaces.

Greg McDowell Jr


I messed with it a little and you are correct sir. It will get way to complicated to write the logic to derive the perimeter values the way I was thinking. Way above my head to write.

Does anyone know how to access the API information that is used in the calculation to determine the perimeter in Revit.


that what I was trying to explain in the post above - the area/room object isn’t as clean as you might expect - even though you see the edge as a single line, Revit will often have several other points inside the line producing a series of co-linear line segments - you need some way to determine which line segments (or end points of those lines) are not just co-linear but also connected - then you can either add up the lengths of each segment or create a new segment after removing the interior points - it’s harder than it looks!


Yeah… I got most of the graph done pretty quick and thought I hit a speed bump… it is more like a brick wall.


I am back at this again… as the project that the graph will be used for is approaching another submittal. Can anyone assist or provide a different approach that I may be able to use OOTB nodes or maybe another package?


try this – it takes grouped curves as an input (I use the Group Curves node from Archi-lab_Grimshaw)

Merge Collinear in Grouped Curves.dyf (34.2 KB)


YOU ARE THE MAN! I did not want to give up on this one. I was so close and that package made it happen. I used other packages but for some reason I could not get them to work.


I forgot about loop merge. That should have worked for you here. Did you try it at the same list level?

I made that node because I had series of lines that didn’t close that I needed to merge.


Yes… I tried the loop merge node multiple ways to try to get it to work… no dice.

Here is the working Dynamo file… for all to enjoy if there is such a thing
Area Plan - Room Name to Area Name and Perimeter Values.dyn (274.2 KB)

This is pretty messy but gets the job done. Feet2Fraction was used but it broke and for my needs the mess of conversion nodes from decimal feet to feet/inches/fractions works.

Of course there are probably many other methods to accomplish this but I posted what I have since many have helped, I will also contribute to the community.