Updating Room Numbers



Hi All,

I am attempting to update the current room numbers with a list of updated room numbers from excel. What are someways I can structure the list I get from Revit to match the order of the list from excel?

Thank you!


Use UniqueId
The order is not important in that case.
Keep in mind you are not creating roomnumbers that are already there


Even with the unique element id I still dont know how to match them to the updated list from excel. It is in a different order than the list I get from revit. See attached image.Capture



I would do that sorting in Dynamo (though it can be done in excel, LOOKUP probably does what you want), use Sort by Key with the old Excel values as the key… You likely need to do some work with your lists to make sure they are the same length (Accounting for new and deleted rooms)…

To help more explicitly it would be helpful to have a stripped down Rvt and Dyn

Hope that’s useful,


Edit: I would do it in Dynamo because otherwise if you are overwriting data you may delete or mess up formulas. I think you want a single clean export so your data is as robust as possible.


As long as all values exists in both lists and lists are same length, this method should work:

Don’t use the OOTB List.ReplaceItemAtIndex, use Archilab’s version. And == must have cross-product lacing used.


Thank you but your plugging a boolean into the element input of list.indexof. Why?


Because the outputs of the == node are booleans.

You could also directly plug excOld and revOld to List.IndexOf, ignoring the == node and the boolean, it would result in the same output.


That sounds good but It is failing every time for me. @mellouze


Please show the attempt that is failing in order for us to help you.


181609 Room Number Swap Edit.dyn (23.9 KB)

Here you go. Thank you for your help @mellouze