Change the numbering of sheets

Hello, good afternoon, I am new to python and I am trying to create a script that changes the numbering of planes, in this example I have from 101 to 105, the most I have been able to change is replacing “10” with “20”, resulting in 201 to 205, but I would like you to renumber, for example, from 101 to 105 by 118 to 122 with inputs, I would greatly appreciate some advice

Hi Piero, welcome to the Dynamo Forum :wave:
SheetNumber values are strings so to be able to do mathematical operations there needs to be some conversion to a number type and then back to a string for updating

n = 17
newNumber = str(int(sheet.SheetNumber) + n)

Hi @davidmisaico01

Here have a look at this snip might help you, as here u can give the initial value that u wish to start your numbering from as in this example i wanted it to start from 118 and it’ll number rest starting from there but here i’m giving input as int so modify accordingly if it helps.


1 Like

Thank you very much for the advice

1 Like