Adding a prefix to all Revit room numbers in a project


I am new to Dynamo and I am looking to change all of our room numbers in a project so they have a prefix part added to it. I currently have it where I can select the room and change them one by one but I would like to just change them all at once. Any ideas how I should edit my dynamo sequence to do this?

Once I get this added for all the rooms I would like to delete it from the prefix spot I have created in Revit as well so it is not duplicated. Would this be possible or might it create issues?



Hi @ottestad.peter,

Replace “Select Model Element” ;

  • Category – Room
  • All Element of Category
    You should add. In this way, you can reach all rooms in your project.

I am guessing it should look like this? I tried this before and just tried it now as well but it is like it is not recognizing all the rooms in the Revit project and none of them are changing. Is there something I have to do for it to recognize all rooms?new%20(3)

Hi @ottestad.peter,

Your lists do not match. Can you try this way?

Hi @Durmus_Cesur,

I have tried this several times and my computer seems to keep losing connection and just keeps loading non stop. I am curious if the Level of @L1 needs to be set at that for GetParameter and SetParameter? If so I will keep trying it and hope that it processes at some point.


Yeah, that’s exactly the point that needs to be arranged. Please keep up to date.


Would you have any idea why or what to do if Dynamo and Revit go into a not responding mode when I click on Run? I have tried multiple computers, restarting the computer, Revit 2017 and 2019 and I have tried both manual run and automatic. I have left it go over night before as well and it just won’t process.

Please run “Manual Mode”.

I have been trying that lately but keep getting not responding so I think we are going to try a different software to get these changes for now

Can you share your code? At least the chart.

This is how I have it.

you might have unplaced rooms that spoil things

I never thought of that but I don’t see any unplaced rooms in schedules.

No rooms?
Can you make a new schedule without filters?

This shows the full schedule. No filters.

Can you sort on area?
Unplaced/Unbounded rooms have no area.

I want to ask you again to make a new schedule, no copies, its important that you do so
This is another way of string joining

Here is my new schedule. I will try this other string join. I feel like we are so close to getting it to work and Dynamo seems like a great tool to fix it all at once. There are nearly 3800 rooms in the project, I don’t know if this would be a bit much to process at once?

check if there will be doubles, room numbers need to be unique