Need Help Matching Revit Rooms to Excel Using a Stable RoomID

Hi everyone,

I’m relatively new to Dynamo, so please excuse me if my approach isn’t the best. I’ve been learning by watching YouTube tutorials and experimenting with different nodes, but I’ve reached a point where I’m stuck and would really appreciate some guidance from more experienced users.

Goal

I have an Excel file that contains room information like this:

RoomID Name Number Department Base Finish
R1 Room-1 AR100 Finance Tile
R2 Room-2 AR101 HR Tile
R3 Room-3 AR102 IT Tile
R4 Room-4 AR103 Operations Carpet
R5 Room-5 AR104 Facility Carpet
R6 Room-6 AR105 Generation Carpet

I added a shared parameter called RoomID to my Revit Rooms.

The idea is:

  • Every room has a permanent RoomID (R1, R2, R3…)
  • If I accidentally delete a room, I create a new room.
  • I manually assign the correct RoomID.
  • After running Dynamo, it should automatically restore all other parameters (Name, Number, Department, Base Finish, etc.) from Excel.

So RoomID should be the permanent key.

Two things to comment on here.

First, Revit has a built in Room Number parameter which likely should be what you use here instead of your Room ID parameter.

Remember, when you accidentally delete a room using most methods the deleted room still exists, remaining unplaced. This means taken you make the new room and give it number R5 you now have two rooms with that number. In these cases the first room is often going to be the one which gets the data (not the new one) due to the pacing method you’ll likely want to use when setting parameter values.

Best to no delete rooms completely and relocate them if they do get deleted, and if you really need a stable element reference use the unique id (GUID) generated for the room elements when you create them.

Thank you so much for guiding, Let me try on this.

I’d agree with @jacob.small
Revit will enforce uniqueness of the Room Number, but not of your RoomID parameter

i would try use guid in all cases, so all can be renamed…i guess :wink: