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.
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
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
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:
In this Excel-File you can add your new name in the corresponding Column, like this:
Now use Part 2 to import this data back to Revit and overwrite the old names.
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?
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:
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.
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
Hi Daan,
Thank you for the giant help with the scripts you wrote for Bradley. I found this forum and it helped me a lot too! Iām trying to use the second part of your script, but Iām having some problemsā¦ Iāll just point them below, as someone might have an input on how to solve or even for you to rebuild something if you want!
- It seems like it doesnāt work when I leave the new sheet name blankā¦ As I tested, I need to at least to repeat the old nameā¦ maybe there should be a part of the script that returns from an analysis and fill it with the old name if thereās no changeā¦
- If I leave only the number of the sheet blank, it doesnāt work either.
- If I have a sheet number that is build in just numbers, it doesnāt workā¦ it needs a letter input with numbers and sometimes we may need just numbers.
Well, Iām not very experienced with Dynamo nor even have had much time lately, but Iāll give a try to change this script when I can!
And thank you again for the scripts you already build!
Hi @franbhupfer,
Glad to hear the script helped you
And thanks for the feedback.
This version of the script is quite simple and prone to some errors, like the ones you pointed out.
These problems can probably be easily fixed by setting up some filters/ copying the old name. Also i think using the ID of the sheet (instead of the name) for reference is a better approach.
If i can find some time iāll see if i can maybe update it a bit.