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:
Thanks for sharing looks pretty good
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:
- 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:
- Filter the unbounded results out of your list in Dynamo (left as an exercise for the reader)
- 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,
- 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.
- I tried filtering as you suggested, but I’m only getting an error.
@JacobSmall … in retrospect I should’ve taken your advice.
Put this code block in after the > node:
a==null? false: true;
That should create the correct bool to filter things.