# Replace Room Name based on Excel File

**URL:** <https://forum.dynamobim.com/t/replace-room-name-based-on-excel-file/84506>\
**Category:** Revit\
**Tags:** revit, excel, dynamo\
**Created:** [December 29, 2022, 3:19am UTC](https://forum.dynamobim.com/t/replace-room-name-based-on-excel-file/84506 "2022-12-29T03:19:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![escarillabj](https://avatars.discourse-cdn.com/v4/letter/e/848f3c/32.png) [@escarillabj](https://forum.dynamobim.com/u/escarillabj)\
**Post date:** [December 29, 2022, 3:19am UTC](https://forum.dynamobim.com/t/replace-room-name-based-on-excel-file/84506/1 "2022-12-29T03:19:28Z")

</div>

Hi to All Dynamo users and masters! 🙂

Im BJ and Im still on the learning curve of using dynamo.

I’d like to ask around if there is a way where I can directly retrieve room info  
from my Revit file automatically match it with my excel file to rename the room name parameter?

I have a sample file here. [Dynamo Files - Google Drive](https://drive.google.com/drive/folders/1CrD0ZLqP1SwgExjIRBWNwgcRIjO5v82c?usp=share_link)

My current workflow is having a separate script for exporting the data and importing it back,

Basically, I use dynamo to export the room names and numbers then  
I match and editing the excel file manually by copying the information from the reference excel file that corresponds to each data (company name and room name)

then after editing the excel file, I use again dynamo to import the revised exported excel to the revit file.

I felt like there’s a much easer process. Like using only one dynamo file instead of two. and also like a dynamo script where it automatically match the room numbers from Revit to the reference excel file.  
if there’s a much simpler process than Im doing right now, that would be amazingly helpful.

Thanks in advance!

BJ

---

<div class="post-metadata">

**Author:** ![GavinNicholls](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/gavinnicholls/32/190442_2.png) [@GavinNicholls](https://forum.dynamobim.com/u/GavinNicholls)\
**Post date:** [December 29, 2022, 3:44am UTC](https://forum.dynamobim.com/t/replace-room-name-based-on-excel-file/84506/2 "2022-12-29T03:44:06Z")

</div>

Generally two scripts works best in this workflow given that export and import work quite differently.

I generally recommend getting element id as column 1, then other parameters after that - this way you have a unique way of retrieving the room on the import step.

I’ve got a video here showing how to use element Id to retrieve objects in a roundtrip scenarios like this one:

[![](https://us1.discourse-cdn.com/flex022/uploads/dynamobim/original/3X/d/1/d101a5c156d89ed781236dfc13a481836e23f1ca.jpeg "Retrieve Revit elements by Id using Dynamo!") ](https://www.youtube.com/watch?v=pFT5vejNzqU)

---

<div class="post-metadata">

**Author:** ![escarillabj](https://avatars.discourse-cdn.com/v4/letter/e/848f3c/32.png) [@escarillabj](https://forum.dynamobim.com/u/escarillabj)\
**Post date:** [December 29, 2022, 4:03am UTC](https://forum.dynamobim.com/t/replace-room-name-based-on-excel-file/84506/3 "2022-12-29T04:03:17Z")

</div>

Thank you so much for the reply, Gavin. and Thanks for the video as well.  
It seems like the safest way for now is to stick with two different script and utilize element ID instead of using directly the room number.

---

<div class="post-metadata">

**Author:** ![ruben.romero](https://sea2.discourse-cdn.com/flex022/user_avatar/forum.dynamobim.com/ruben.romero/32/115842_2.png) [@ruben.romero](https://forum.dynamobim.com/u/ruben.romero)\
**Post date:** [December 29, 2022, 8:44am UTC](https://forum.dynamobim.com/t/replace-room-name-based-on-excel-file/84506/4 "2022-12-29T08:44:06Z")

</div>

> [@escarillabj](#):
>
> instead of

Hello i recommend you to create Rooms Key schedule in Revit to define any parameter of rooms so you use it as your Excel. You could use Dynamo to change values of key schedule but unless you got many rooms in the project, task looking silly
