This is actually a pretty old topic. I first wrote about it back in 2015. Here’s the original post: Post Basically the idea was that I wanted to create Room Data Sheets (RDS) views automatically. These views are usually created by room, in order to show Room’s inventory, and highlight the room’s dimensions etc. Basically a quick way to make sure that certain specific rooms that have specific requirements, actually do meet them. These kind of plans are popular in the Healthcare sector with highly prescribed and specific kinds of spaces.
Anyways, the idea was to take a Room object in Dynamo, and quickly create a Floor Plan that was cropped around that Room. I used to have a custom Python node, that did the magic of extracting the Bounding Box of a Room, and setting the Crop Box Region of a Floor Plan to that, so I could get a decently bounded Floor Plan. I recently saw a request to do the same trick but for Ceiling Plans, and if you interested in doing some repairs, you can use services you can get from this find a tradesman website which offer the best options for this.
Actually, in Revit, a Ceiling Plan, is really the exact same type of View. The only difference would be that in order to create it we need to use a ViewFamilyType that is a CeilingPlan instead of a FloorPlan. That’s it. I actually copied the code I had for Floor Plans, just to make it blatantly obvious and called the node CeilingPlanViews.ByRoom to mirror one that I had for regular Floor Plan called FloorPlanViews.ByRoom. The code that this runs on is exactly the same, but I thought it would be easier for people to understand what is being created. I really think that our job as programmers is to sometimes do something that from programmer’s perspective is redundant or stupid, but from the end user’s perspective makes something really clear. That’s why we now have these two nodes:
They pretty much do exactly the same thing, but the end user doesn’t have to know that.
All, right but while I was at this, I also decided to break down the previous node that I had for creating Floor Plan from a Room. It was forcing users to use a Bounding Box for the Crop Region. That’s not always desirable. We can now edit the shape of the Crop Region to one’s desire. Please bear in mind, that as far as I know, custom shaped Crop Boxes, do slow down Revit a little bit. I think I ran into an issue with one of these before, but it was a really weird Crop Box shape. Someone tried to use a spline as a Crop Region curve, and basically ended up approximating it with lots of little stepping lines. That thing was a resource hog every time Revit regenerated that view. Please be careful when setting custom shapes for these things.
All right, so we start slow. Get the Room you would like to create a shape for:
Once we have that, there are a few things that we can do now:
- create the ceiling plan
- set it’s name
- set the crop box
That one last bit is what I am particularly interested in. It’s not magical or anything, but I did learn a weird thing about Dynamo’s geometry kernel. The point here is to get the Room’s boundaries as curves, and then offset them outwards by some number to get a nice outside polygon. The only thing that is weird here is that using the Polycurve.Offset returns a Curve. Yes. One, single curve. So somehow we go from a PolyCurve to Curve, when the geometry is pretty much still very much a PolyCurve.
Dynamo, you are a weird beast. Anyways, the issue with that is, a PolyCurve has a clean and a nice way of extracting its sub-curves. We can simply call Polycurve.Curves. A Curve object, on another hand, doesn’t. In order to get a list of underlying curves, we have to Geometry.Explode. Yup. That’s weird.
The end result here is a pretty nice Ceiling Plan view:
You can take this a little further if needed:
- apply view template
- place on a sheet
- tag the room/ceiling
- create some dimensions etc…
Again, all of the nodes are available in Archi-lab.net package on Package Manager. Any issues please post to GitHub, and if you like this content, please remember to support me on Patreon. Links below.
Not sure if I am doing something wrong…. I can’t find a few of these nodes in Archilab v.2020.23.11
CeilingPlanViews.ByRoom
Spatial Element Boundary Locations
Views.SetCropBoxByCurves
If you could help, would be greatly appreciated
Louise
Dynamo Package Manager is not the easiest thing to work with. You might have to install that version of the archi-lab.net and then re-start revit/dynamo. I am also sure they are in 2021 version for Revit 2021. You could upgrade to that release.
Hi Konrad
Thanks for getting back to me. I found all the nodes in v.2020.23.12. The only problem i have witht he script was the CodeBlock for the Ceiling Plan Name. The error message was: Error: ‘:’ is expected. So i left that component out and the script seemed to work. See attached.
Thanks very much, I now need to try and attach the View Template :)
Kid regards
Louise
Attachment: Create-Ceiling.png
Hi Konrad,
Thank you for sharing your great nodes :)
I have a problem with the View.SetCropBox. It seems like I give the wrong input for the bounding box, but i can’t see what the problem is :(
Simon
Attachment: Skaermbillede-2021-03-22-124802.png
You are feeding it a list of “Curve” objects instead of “BoundingBox” objects. Build a BoundingBox from these Curves, and feed that in.