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!
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.
Hey,
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,
Mark
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:
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
Hey Kloffredo,
Can you help me with update my room numbers with a list of updated room numbers from excel?
@canx0038 Sure, what trouble are you running into?
KL
Here is the recent room schedules. The orange/pink column are the old room numbers, who I will update with the yellow column. (Column A and D is Element IDs for the rooms)
Now… I don’t know what is easiest?
-Can I update room numbers without Element IDs or I need them?
When I Try to make a script; Room numbers update, but in wrong order…
Thank you!