Our Work

Our Firm

Our People

News And Ideas

Use Dynamo to Place Families inside Rooms

On a recent project I needed to place a family in the center of each room in the project. With hundreds of rooms in the project, I did not look forward to placing all of them individually. I knew that Case had a 3D Room Tag tool that would place a generic model 3D Room tag family in the center of each room and populate the room number and name parameters. Although very handy, I’d much rather have a multi-purpose tool that can be customized for different conditions and needs. For instance, what if I needed to place a different family or locate the family away from the center of the room, or at the centroid of the room? Also, since Case is now part of WeWork, the registration system is no longer available and unless you already had the app, you were out of luck…until today!

This article demonstrates a Dynamo graph that will replicate the functionality of the Case 3D Room Tag tool. To get started, make sure you’ve installed the latest build of Dynamo (0.8.2.2392) as of this article. Also launch the package manager and grab a copy of the Grimshaw, LunchBox, Clockwork, and my latest BesideTheCursor packages. If you don’t have the 3D room tag family, I’ll post it to my blog at www.integr-8.com and you can grab it from there.

Node Recipe:

1 – Levels

1 – Boolean

1 – Get Rooms By Level

1 – Number

6 – String

1 – Level.Plane

2 – Element.GetParameterValueByName

1 – Geometry.BoundingBox

1 – BoundingBox.ToCuboid

1 – Solid.Centroid

2 – BoundingBox.PerimeterCurvesOnPlane

1 – BesideTheCursor ReplaceEmptyStringValuesInList

1 – Curve.EndPoint

1 – Polygon.ByPoints

1 – Polygon.Center

1 – FamilyInstance.ByPoint

1 – FamilyTypes

3 – Element.SetParameterByName

Using the recipe above and the image below, you can recreate the graph to generate your own tool. Visit BesideTheCursor blog to see the “how to” article behind this tool and walk through the creation step by step.

Take a look at the provided image for the method used to populate the department names, determining first whether the department was previously populated or left empty. Some parameter assignments will throw errors if you try to pass in nothing. I used a check length of string method to validate the data and substitute a replacement value based on the string length. You can get that custom node from the BesideTheCursor package. If you already have the 3DRoomCube family from case, this graph will be able to use it and populate it. If you wait til tomorrow the longer article will be published on BesideTheCursor, where you can get a copy of the graph and the BTC_3D_RoomSignPost family.