I have a very large script to create PDF and DWG files in Revit. On the rare occasion a user hasnt updated his packages or is missing a bunch of paperforms in windows, the script could produce a fatal error. (this doesnt happen ever when a user has followed my guide to installing to the T.)
I made a small addition to my script that asks the user if they want to synchronise to central before continuing with the print job, to protect users against loss of work if they forget to synchronise and for whatever reason Revit crashes.
Now i’m wondering, if you have a script and there’s a fatal error in there somewhere, will a passthrough node provide a small window to synchronise before an error occurs?
This part is at the very start of my script, nothing else gets loaded before this part produces an output.
If you know where are more likely to happen those fatal errors, you can add some sort of validation setps to avoid them and give empty lists the the following nodes and add an output node to give an info to the user.
I think you made a script to create PDF’s and DWG’s unattended.
If you pause for user input, the script is not unattended anymore.
Maybe its better to solve the problem of the Packages/Paper forms instead.
Hi Marcel, thats correct.
Although this synchronisation prompt is the first prompt of 3, the user has to select sheets and select a filename method afterwards. So user input is required anyway.
I am trying to catch unforseen errors as well, perhaps the question could be simplified.
I NEED users to synchronise before running large scripts. I want to do this with a prompt that syncs for them if they press yes. Will a passthrough node prevent nodes after from loading entirely until an input is received into the passthrough node?
Lets say the codeblock is a fatal error, which occurs as soon as that node is loaded, will dynamo be able to do whatever is before the passthrough node before crashing? Or are nodes preloaded before actually supplying information into the node?
If you’re saying Dynamo crashes just on opening the DYN, before even running it, then, yes, it will fail before giving the user a warning. However, I don’t think I’ve ever heard of that just from missing or outdated packages. It might be worth clarifying that.
While nodes have to execute in order of their inputs, Dynamo more or less runs all at once and defaults to a singular Revit transaction. You could introduce a user pop-up which would give a warning before continuing, but you can’t have any Revit interaction before Dynamo completes. So a mid-script sync is out of the question (unless you automated it).
Thank you for your response!
I have made a prompt asking the user if they want to sync before continuing, if they press yes, the model will synchronise and afterwards the script will ask the user for the desired sheets to print.
When i run this script, i can see in my Revit server log that I have synchronised, while the script is still waiting for my sheet input. I have not used a transaction end/start node after the syncing.
Since the Revit Server log shows i have synchronised, is everything i have done before running the script now saved? or will a fatal error now result in issues as the transaction is not completed?
To this, One thing i noticed when Revit could crash (depending on the size of the project and content of the sheets) if a user tries to print like 60+ files at once, so this would result in a crash halfway through the run.
If you’ve already got the sync portion automated then you should be fine.
This is definitely something to watch out for, but just an unfortunate part of trying to automate these kinds of things. As long as you’re not modifying elements that could cause issues with a crash and partial complete your model should be fine. It may just be an issue of educating your users to select ~50 sheets at a time (or fewer if dealing with “heavy” sheet content).
I got into Dynamo about 2 years ago and it was the first script I ever made. I underestimated how much it would be used in the end, as its now the biggest time saver we have in the office. about 12 users printing PDFs with my script saving over an hour of work each week per person… Perhaps I am ready to start endeavoring shrinking down my scripts with the use of python nodes…