Script to Assign Furniture Marks by Room Number

I’m working on a script to automatically assign unique Marks to furniture instances, based on the Number of the Room they’re located in.

E.g. Room 101 has 5 Furniture instances, I want to change the Marks to 101A, 101B, 101C, 101D and 101E.

(I’m also filtering room names to only include “Open” and furniture to only include “Workstation”)

Right now, I’ve got a working script that can set all furniture Marks in the room to 101, but I need to add a letter suffix to each instance, that restarts at “A” when the room number changes.

When working on stuff like this, I like to use the method that FamilyInstances have available to them. FamilyInstance.Room

Here is a version of this workflow:

20180305-furnitureMarkByRoom.dyn (12.6 KB)

1 Like

Thanks for the response. I’m not seeing the FamilyInstance.Room node from Rhythm, is it available in Dynamo 1.2/Revit 2016? Thanks

Ah darn. Yeah, only 2017+
Here is another method using some archilab nodes

20180305-furnitureMarkByRoom.dyn (13.8 KB)

That worked, thank you so much!
We have Revit 2018 too but this project hasn’t been upgraded yet.

1 Like

I spoke too soon. It worked in my test project, but in the actual project, it created a bunch of blue dots around the workstations, and gave me an error:

Is some of your furniture not reporting a location?

I created a quick script to get location of selected elements. My workstations do seem to have a location.

Would it give an error if there are overlapping or duplicate rooms?

Edit: tested with duplicate rooms in the test project, it didn’t give me any errors.
Edit2: Seems like unbounded rooms are giving it trouble.

If ANY single furniture item is not located in a room, it gives an error.

It’s still giving me errors when I have a furniture item in the model that doesn’t match the string I search for.

Something was screwed up with the coordinates. Ultimately, I installed an older version of the Rhythm package, which let me use the older Element.Room node. Everything seems to be working now, except I can’t get letters past Z (for rooms with more than 26 workstations). How can I tell it to repeat to AA, BB, etc. after Z?

Thanks again for your help!

Hmm. You might be able to use a node from clockwork. AlphabeticSequence I think.

My FamilyInstance.Room is unresolved though I have rhythm installed. Any alternative for this node?

Or can i have the codeblock / phyton script of the node instead?

Hi @john_pierson

Thanks for the routine. This method is for search by type… And how can I search by Family Name? I tried, but I couldn’t do it…

I had to rename it a while back. Did you try searching for FamilyInstances.Room (plural class name)

Thanks @john_pierson… unfortunately still cannot find it.

What is your Revit version, Dynamo version, rhythm version?

Dynamo Core
Dynamo Revit

Rhythm 201.3.23
Revit Version : 2017

Yeah, I don’t believe Rhythm will run on a Dynamo version that old. Currently rhythm is built against dynamo 2.0.2 and Revit 2019, but should be compatible with versions back to 1.3.3 and Revit 2017.

Can i just copy the phyton script or code blocks from that node instead?

The nodes are zero touch c# so the code is embedded. Another option is to download an older version from

But I really suggest updating.