Creating sheets - odd behaviour

I’m using the Sheet.ByNameNumberTitleBlockAndView node to create sheets from an excel file. The script is based largely on the one produced by @Brendan_Cassidy but without the Codeblocks and using standard nodes instead. In general terms it works fine, however I’m experiencing some odd behaviour with the node.

In my excel workbook I currently have two Sheets labeled (00) and (22). the first has about 20 sheets the second 6. if I run the script on the (00) sheet it creates the sheests fine. However if I now run the same script directly but selecting sheet (22) it replaces all the (00) sheets and just leaves the 6 (22) sheets (in some other instances it has just replaced the first 6 sheets but the issue is largely the same)…

If I close the files down, reopen and run the script again (same files and settings) for the (22) sheet it works fine and adds the sheets in as expected.

Is this a bug in the node or am I missed a fundamental principle here?

Some files to help with the understanding of the issue…

Screencast demostrating issue

No this is just how Dynamo works. The last run is always undone before running again, unless you close and reopen Dynamo.
The idea is that if you are creating something with lots of inputs you can run it in automatic mode and adjust your settings until you get what you want, without creating a new instance every time.
If you do want to make permanent changes every time you run, try adding a Start Transaction node before the bit that actually creates the sheets, and an End Transaction node somewhere after. Then when you run it should show 2xDynamo in the undo list in revit, only one of which will be undone automatically (Everyting after the End Transaction, so put that at the end).

2 Likes

Nice tip @Joseph_Peel

Thanks Joseph, that is very handy to know. I’ll try adding the Start and End transactions as you suggest.

cheers

K.