Rename batch of revit drawing names from excel

Hi, I have a large number of revit sheets that need to be renamed. I would like to export a list of all sheets to excel, add a new column with the new names, and import back into revit such that the new names will replace the old. Is this possible?
Thank you!

sure
get all sheets, then get Sheet name, export them to excel by the node, add and change what you want in column in excel but it is important to keep the same order

in another script, import them pack from excel, and get the desired sheet name list , and use setparametervaluebyname to set the new name

try to start with that and let see what you got

Thanks for your response. When you say to change what I want to in the column in excel, do you mean to actually change the existing drawing name? Is it possible to instead add the new name for each drawing in the next column and have this read back into revit similar to what a ‘lookup’ function would in excel? I feel this might be a bit safer in case the order changes.

you may add the new info in a new column, yes, just make sure to check its index in dynamo before set the parameter values

I would recommend having the Element GUID as a column for export. That’s the most sure fire way to make sure you get the right sheet. You can then use that to select the sheet you want rather than looping through them all and matching the name.

1 Like

Hey bradley how is your script looking so far?
If you do not have a completed script maybe i could take a look / finish it for you :slight_smile:

Daan, I’m brand new to dynamo so am struggling to get started. Any assistance would be greatly appreciated!

Do you already have a start in Dynamo, if so, please upload your Dynamo file.
Else i will make something for you :slight_smile:

No, I haven’t started one yet.

All right i do not have a lot of time on my hands but i will try to create something for you

Hey man i have finished your script(s).

I have split them into two scripts, one for exporting all the sheet information, and another one for importing the new sheet information. Just open this script in the Dynamo Player and you will have an easy interface for your end users:
Part 1 looks like this and will export this Excel-File:

image

In this Excel-File you can add your new name in the corresponding Column, like this:
image
Now use Part 2 to import this data back to Revit and overwrite the old names.
image

Hope this solves your problem!
Part 1 - Export Sheet Names with Sheet Number as Reference.dyn (22.4 KB)
Part 2 - Import New Sheet Names from Excel.dyn (27.1 KB)

  • Daan

Hi Daan, you’re a champion - thank you very much! I’ll have a play around with it, but just wondering if it’s possible to change the sheet number instead of name? Would this disrupt the reference?

1 Like

This script uses the sheet number as reference, so yes changing the sheet number will disrupt this script. But there is probably a simple solution to also change the number. I’ll have a look at it.

This is how the Excel Looks like now:
image

This way we can still use the first column as reference, but also have the option to change the sheet number.
Also this script will work properly, even when you leave some “New” inputs empty. :slight_smile:

Part 1 - Export Sheet Numbers and Names 21-01-2020.dyn (26.7 KB)
Part 2 - Import New Sheet names and or Number from Excel 21-01-2020.dyn (33.3 KB)

  • Daan