Revit - Automating adding room tags based on furniture placed

Hi everyone,

I’m fairly new to Dynamo and am trying to figure out some things to speed up my workflow in Revit.

I’m trying to make Dynamo add room tags based on the furniture families i’ve placed in certain rooms. For example if i put a shower family in a room, Dynamo should recognize it as a bathroom and place a roomtag called ‘bathroom’.

Later on i plan on trying to also make Dynamo place floors based on these room tags or families as well.

If anyone has some tips as to how to approach these two scripts it would be greatly appreciated!

Greets Jens

break this into sub tasks or sub functions.

  1. id what families are in each room - return a data structure that you can ask the question - given room x, what families are present.

  2. write a function which maps from a collection of families (maybe relative levels of family types (%) - to a specific tag)

  3. apply both functions to all rooms.

With BimorphNodes v2.1, there is a node called BoundingBox.GetElementsInside. You could take the room and find it’s boundingbox, use that bimorph node, and check for elements inside if match a family type.

Thanks for the advice! I installed the BimorphNodes v2.1’ package but i can’t seem to find the BoundingBox.GetElementsInside node.

I assume i can use the node BoundingBox.Contains to check if the point from one of the families is inside the boundingbox of the room.

Is there a standard node to determine the bounding box of a room?

It should just be Element.BoundingBox, with room as an input. Rooms have a boundingbox with the height set to what the room’s height parameter is.

Bounding boxes are a horrible way to track what’s in a room as they are orthogonal and don’t take into account unique shapes like L or U shaped rooms. Element.Room is likely the way to go here (my memory may have failed on that name) or PointIsInRoom.

Is that from a package? Can’t find it in OOTB in 0.9.2

OOTB but in a newer version of dynamo. Install a later version. What Revit version are you in?

  1. But I can’t even find it in the Dynamo Dictionary, unless it just hasn’t been updated in a while. Unfortunately, while I can access Revit 2017 with Dynamo 1.3.2, for my office I have to make all scripts compatible with 0.9.2 due to other people not wanting to update every computer in my office.

Side note, didn’t realize using numbers followed by a period would automatically make it a list and indent as such.

Where can i find the FamilyInstance.Room node? I’ve been looking for a while now but i can’t seem to find it.

I installed the newest version of Dynamo hoping i’dd find the FamilyInstance.Room node and now i have even more nodes i can’t find anymore. :confused: Looks like that’s not the way to go…

Sorry all - it’s in Rhythm. Sorry for the headaches.

1 Like

Works like a charm now! Thanks for the help!

Please mark a post as a solution so others can find in the future. :slight_smile:

1 Like

Last week i tried it on a simple revit model and this all worked perfectly. Now i’m trying it on a real model i’m working on and i’m getting the following error:

Internal error: Please report: Dereferencing a non-pointer

I did some research but can’t seem to figure out what’s different in this model than the other.

I found that most of the time when this error occurs something wrong is feeding into a certain node. But since it worked before it’dd be stange that it doesn’t anymore without changing anything.

Check the nodes prior for null values or empty lists. That’s usually the case.