Super Autosave Archiver...
-
would be a script that - when activated - incrementally saves the file (every 10 or 15 mins) with the same name and the current time added as suffix.
might be wrong but i'm not aware there is something like this..
-
doesnt sound too tricky, i imagine if one of the ruby types around here had a go they could probably manage something, TIG, didier, azuby?
-
Maybe a remember my announcement of ModelHistory plugin, which saves the actual model and additional things - but only on user interaction.
The "tricky" thing in this case is the exact time of 10, 15 or whatever minutes. I've shown this with the current version of the CurrentDate plugin: You need a thread running in the background. If you would do it without thread, Sketchup freezes the whole time. But if you use a thread, there is the problem of how often this thread runs. If you work with Sketchup, the thread runs very often (depends on what the thread is doing), but if you let your mouse asleep, Sketchup won't wake up the thread.
But if it remains out of consideration, it could be done.
azuby
-
CadFather,
That's a good idea. SketchUp already is autosaving the file at some interval. I wonder on a large model if the autosave would cause SketchUp to be unusable during the save? Or if it would interfere in any way with the built-in autosave?
azuby,
Wouldn't UI.start_timer work? Have a dialog to set the interval, enable, and disable the autosave. Start a timer, save on time-out, restart timer? It seems like a viable solution, and simpler than threads.
Edit: Ok, I see where the built-in autosave can be diabled.
-
OK, haven't seen this before. Have you figured out, whether this method is (nearly) exact? By the way, it has a second argument for repeat.
azuby
-
-
Don't know. How late is it in your city?
azuby
-
well.. it's 3am in england! (modelling that is)
sketchup does pause when autosaving, it's ok if the lapse is some 15-20 mins.
but if i could access the history of my model file by file i could keep being messy and not worry about it..EDIT: Goodnight
-
just thinking, if there is a way to automate files > save as copy and then add the current time suffix it's done.. no?
i wish i had a brain...
-
My Archiver.rb script adds a File menu function to make an archive of the model as you wish (they are a snapshot of the model at the moment you make it NOT the last saved version). You could make a shortcut key to do this for you... I did dally with a timed version - and this was recently requested again, but pressures of other things (like 'real work') got in the way - for big models auto-archiving every 10 minutes whilst you are in the middle of doing something is NOT good as it can take some time. YOU should make backups of your model at regular intervals that's what 'Archiver' is for. They are named after the model and dated/timed/user-named and put in a folder with the model...
-
@cadfather said:
just thinking, if there is a way to automate files > save as copy and then add the current time suffix it's done.. no?
i wish i had a brain...
That's a good thought, CadFather. But we aren't able to change the behavior of the Save a Copy as function. It can be a new menu item, or a toolbar button, or a shortcut key.
TIG,
I tend to agree that it is the user's responsibility to make the backup. Maybe a compromise on large models - use the timer to pop-up a reminder dialog and ask to make the backup.
-
..i lose too many things along the way (models too complex). i did some tinkering with archive but wasn't sure it was working ok and did not look further, but thanks for the tip - will definitely give it another try and hit the button more often. (though to be sure my shortcut keys need three fingers and a pedal nowadays)
i guess that settles it.. when in other programs those windows pop up asking me whether i want to save.. i never do!
Thanks as always...
-
to be sure, archiver is the one, with a shortcut key i get perfect results - or almost..
i have tried to change the script a bit, but have trouble changing the date formati think this is the code but haven't managed to figure it out.. am i along the right lines?
sfix = t[5].to_s[2..4]+sep+t[4].to_s+sep+t[3].to_s+sep+t[2].to_s+sep+t[1].to_s+sep+t[0].to_s
-
@cadfather said:
to be sure, archiver is the one, with a shortcut key i get perfect results - or almost..
i have tried to change the script a bit, but have trouble changing the date formati think this is the code but haven't managed to figure it out.. am i along the right lines?
sfix = t[5].to_s[2..4]+sep+t[4].to_s+sep+t[3].to_s+sep+t[2].to_s+sep+t[1].to_s+sep+t[0].to_s
That hurts my eyes.
Time#to_a: http://ruby-doc.org/core/classes/Time.html#M000272
sfix = (Time.now.strftime("%y %m %d %H %M %S")).split.join(sep)
Time#strftime: http://ruby-doc.org/core/classes/Time.html#M000297
And if you don't care about the format of the date, this create a number suffix that will also sort by name correctly.
sfix = String( Time.now.to_i )
-
Jim, even i understand that now, thanks!
EDIT: works well
Advertisement