The sheet number is already in use

hey!!
I just created a Dynamo script on REVIT to generate a title block automatically. However, when I try to change the sheet name using Excel, a new sheet is created with the new name I entered. This causes problems as the other sheets keep their original name, which can result in duplicating the sheet name. I simply want to replace the name of a sheet when I make a modification.

Hello @BAPTISTE.DAMEMME and welcome here… Yes sheet number have to be unique, you could try to give them a temp number…here is an fast exemple…another way could be try Bimorph node rename sheets…
Revit_mrB7czuIri

Thanks for your reply, I am creating an automatic title block based on an Excel file and I want to give the user the possibility to change the name of the sheet during the project (for example in case of a typo) without having to recreate a sheet. I will try to use the Bimorph node to rename.

I’ll see how it works

I have to make a condition ?

if the name of the sheet exists then rename it with the new one otherwise create the sheet with the given name

1 Like


plug in your nodes with Sheet number in x in the == node. OBS pay attention to cross lacing on the == node
Will put a * on the nodes which already have that number (cant change the* to anything you want)

Uses Spring Nodes Package

thank you for your reply , I’m a beginner on dynamo, I sorry, i don’t understand all your code, how do I use Uses Spring Nodes Package ?
I try to understand the bimorph node but it’s complicated to set up.

it’s ok i didn’t find my error but it works now, i save my excel with the new ones replacing the old ones i run my program and it renames me the sheet keeping the views inside

thank you very much for your help and the time you spent

1 Like


1 Press package
2 search for Spring Nodes
3 install
image
1 Right click the == node select lacing
2 choose Cross product

in X here is where you put the Sheets numbers. what the script i posted will do is check through all sheets your project and cross reference thier Sheet number with the Numbers you provided in X this will provide a list with True or false results if it exists or not. it will sort out the true values (your duplicates and assign a suffix to your Sheet number (as stated by the code block in the end currently the suffix * will be assigned to any duplicate Sheet you have OBS it will change the name of already existing sheet your new sheet will have the name you put in your list.

Okay, thank you very much for your help, I’ll try on my side by downloading the packages