Sheet number rename


Can somebody help me what’s wrong with my simple script here.
My aim is to rename my sheet numbers by adding underscore
( “_” ) when my parameter (Printset) is equal to 1.


Please see attached DYN file.

Thanks ahead.


Generally it is recommended to show your image graph as part of your query as this will speed up things. Others in this forum are experience on the kind of issues so by just looking at the graph they can tell you the solution. Having the dyn is a plus but someone need to download it and open in a pc for us to be able to help. Like me for example i want to help but i am not in a computer, so by seing the graph i may solve your query. Can you post your image graph. Tnx…

1 Like


Many thanks for that advise. Definitely, it’s one knowledge learnt for me from an experience user and will make sure that i will screen capture my script in the future. Really very good advise for us beginners.

Please see below.

It seems to stop after doing one rename here…

Thanks ahead.


Try to set lacing to longest

unfortunately, it’s the same problem i’m getting

It might be caused by an existing name violation. Are you renaming all sheets indiscriminately? For example, if the number hasn’t changed, are you still renaming it with the same name for convenience?

If that is the case, use BimorphNodes RenumberRenameSheets as it’s designed to handle the problems that can arise as a result of this workflow and will rename successfully where SetParameterValueByName can fail.

1 Like

Hi Thomas,

What i did in the script was to filter all sheets with parameter printset=1, then do the rename. I tried to use the BimorphNodes but gets the same result.


Whats the issue? Was it not working? Or you think its not working? By close inspection of your screen shots you do not need thomas to tell you that you trying to rename same sheet therefore in your list of new names its “c” was the last therefore thats what you get as your renamed sheet it has already went and rename the sheet three times. Or is this the issue? Are trying to duplicate now instead? Or still renaming?

I was expecting that all sheets, with printset=1, be renamed. That is 01-1000 & 01-1031 should all be renamed as well, but it looks like that the script stopped after the first rename?

@Joel_Buenafe as @4bimfercesp said, your previous image shows a watch node with 3 consecutive 1’s. Assuming they are the indexes you are inputting into your GetItemAtIndex node…the problem is you are selecting the same sheet 3 times…which means you are also renumbering it 3 times! If that is the case, there’s your problem!

You should connect your selected sheets into a Sheet.Number node to verify the sheets you’ve selected in plan English

Rather than hard coding the indexes, use a programmatic approach, like getting the PrintSet parameter of each sheet, test for equality to 1, then simply use a FilterByBoolMask. That way, if your indexes change or you add or remove data from PrintSet, your script manages itself.

1 Like

Well spotted Thomas.

Let me check my script and see how i can make this work.

Many thanks for your input.

Instead of using FilterByBooleanMask on your parameter value, use it on the actual sheet elements.


Hi im having an issue with the sheet renaming node could you help me out ?
at this point im only getting a function on the node.

The node is expecting more inputs. I believe that node renumbers AND renames, so it’s expecting new names as well. Try just using SetParameterByName.

I have upload a script for your goal.
Try it.
:wink:Processing: Rename Sheets.dyn…