Visualizing AREAS by Color

Today I was asked the question if it is possible to re-structure the Dynamo workflow in a previous blog post to colorize Area elements instead of Rooms. Here is an example of how to do so:

Visualizing Areas by Color.dyn (17.9 KB)
Visualizing Areas by Color.rvt (1.1 MB)


Hi @Kyle_Martin

Thanks for sharing looks pretty good :+1:

1 Like

I’m trying to get this to work in a project, but my script/graph is giving me an error at the PolyCurve.ByJoinedCurves step. Specifically “Cannot make a PolyCurve from an empty list”. Any idea of what’s causing that? I do see the polygons created, but not turned into a solid.


I recommend you start a new post with an image of your graph and the associated error. Hard to troubleshoot otherwise.

I posted it here as it pertains to this exact graph with no modifications. New to the forum, so I can start a new post if that’s considered better here.

@sburca You could try using OOTB nodes “Room.FinishBoundary”. See if that works for you.

Without looking in detail at your RVT file, you’ve probably got undefined Rooms. ie you have some Room objects with no defined boundaries, hence Dynamo will find an empty list for the boundary collection for that area.

To solve this, either:

  1. Remove unbounded Rooms from Revit (probably the best choice, unbounded objects are bad, m’kaaay?)

but if you want to learn more about filtering & list handling in Dynamo:

  1. Filter the unbounded results out of your list in Dynamo (left as an exercise for the reader)
  2. Filter the Room list for Area <=0, then pass filtered list to Curve to PolyCurve function (also exercise for reader) - this might be preferable as it will retain the order of the Room Element list in case you then want to apply further operations.

Thanks for your help all.
@Kulkul the OOTB node didn’t help - got the same result.

@Adrian_Esdaile this sounds like the likely culprit. However,

  1. All my rooms show up as bounded in Revit. And if I use the LunchBox Room Element Collector node, the list is shorter, and the unbounded rooms do not show up. Had some other problems with that one though, but I’ll give that a try in the meantime.
  2. I tried filtering as you suggested, but I’m only getting an error.

@jacob.small … in retrospect I should’ve taken your advice.

Put this code block in after the > node:


That should create the correct bool to filter things.

So after attempting a few options, I finally found one that worked… mostly (solved the immediate need and is usable via screen-grab, but needs a bit more tweaking in “Model to Revit”). All your help was invaluable.

This one goes through Excel to allow color tweaking.