Toggle-able option to force save after X amount of script runs

I just threw together a dyn that grabs a specific portion of a directory’s contents’ filenames into a list of strings. Long story short, I fed that input into the “SendToClipboard” node and Dynamo Core crashed on me. Before I saved, and that got me thinking.

What about a feature that you can toggle on/off on in the settings, that will force you to save your work. It would allow you to “Run” an unsaved.new dyn a user-specified number of times, before it asks you to save and name the current file.

For instance, toggle “SavedYourLife” option ON, with a set value of 10.

You open a new dyn, end up clicking RUN/F5 9 times, and on the tenth time a save dialog pops up (before the script actually runs) and you can save the dyn file or cancel. Continuing to test your luck with avoiding the impending/growing frustration of a lost dyn file.

“What if you leave the default Run mode in “Automatic”?” You ask?

Well then it would count down the same X value (that you set in the settings) in minutes.

So if X was set to 10 then it would wait 10 minutes before the save dialog appears for you.

As I said, it was a thought that occured to me earlier and I was looking to get some feedback on this theoretical hair-saver.

Hmmmmm… good idea, but I am not sure that number of runs would work well as a flag. Of the three methods for running graphs you’d pass that number quickly in Automatic, would pass it quickly or slowly with Periodic, and would pass it in the right timeframe with Manual.

A ‘it’s been 15 minutes since you last saved’ might be better as it would work in all cases and would be consistent with other applications (Revit, C3D, etc.). Likely doable as an extension, but someone like @Michael_Kirschner2 might know better.

If you’d like to see this as a core part of the application, can you please submit the idea to the Dynamo Wish List. That will get the development team’s eyes on it.

There is also your backup location to pull from (though this may not catch Python code edits).

2 Likes

A ‘it’s been 15 minutes since you last saved’ might be better

I like the sound of that better as well, it’s preferable to me to retain the option to specify the interval, which this solution would also allow.

Thank you, I’ll submit this idea to the Dynamo Wish List!

1 Like

That would be nice!

Personally i make an backup each day when i start my script, i just save it with another Version name (V01, V02, etc.)

You could also maybe set a timer as a reminder to yourself :slight_smile:

1 Like

I usually backup my work as well, though I frequently throw together a new dyn script to automate a moderate-length task. In doing so I sometimes get caught up in what I am doing and end up breaking Dynamo before I get the chance to save or even name it.

Though that timer might be a good idea

1 Like