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.
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.
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.
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.