sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Super Autosave Archiver...

    Scheduled Pinned Locked Moved Plugins
    15 Posts 5 Posters 2.8k Views 5 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A Offline
      azuby
      last edited by

      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

      *error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory | PluginsHelp | PronButton | SAWSO | SCP | SUยฒCATT

      Bad English? PM me, correct me. :smile:**

      1 Reply Last reply Reply Quote 0
      • J Offline
        Jim
        last edited by

        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.

        Hi

        1 Reply Last reply Reply Quote 0
        • A Offline
          azuby
          last edited by

          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

          *error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory | PluginsHelp | PronButton | SAWSO | SCP | SUยฒCATT

          Bad English? PM me, correct me. :smile:**

          1 Reply Last reply Reply Quote 0
          • J Offline
            Jim
            last edited by

            @azuby said:

            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

            I have no reason to think it's not accurate, do you?

            Are you writing this or am I? ๐Ÿ˜‰

            Hi

            1 Reply Last reply Reply Quote 0
            • A Offline
              azuby
              last edited by

              Don't know. How late is it in your city? ๐Ÿ˜„

              azuby

              *error initus :: Blocks | CurrentDate | d/Code | extensionmanager | FFlipper | HideEdges | MeasuredArea | ModelHistory | PluginsHelp | PronButton | SAWSO | SCP | SUยฒCATT

              Bad English? PM me, correct me. :smile:**

              1 Reply Last reply Reply Quote 0
              • CadFatherC Offline
                CadFather
                last edited by

                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

                1 Reply Last reply Reply Quote 0
                • CadFatherC Offline
                  CadFather
                  last edited by

                  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... ๐Ÿ˜

                  1 Reply Last reply Reply Quote 0
                  • TIGT Offline
                    TIG Moderator
                    last edited by

                    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...

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      Jim
                      last edited by

                      @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.

                      Hi

                      1 Reply Last reply Reply Quote 0
                      • CadFatherC Offline
                        CadFather
                        last edited by

                        ..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...

                        1 Reply Last reply Reply Quote 0
                        • CadFatherC Offline
                          CadFather
                          last edited by

                          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 format

                          i 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

                          1 Reply Last reply Reply Quote 0
                          • J Offline
                            Jim
                            last edited by

                            @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 format

                            i 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 )
                            
                            

                            Hi

                            1 Reply Last reply Reply Quote 0
                            • CadFatherC Offline
                              CadFather
                              last edited by

                              Jim, even i understand that now, thanks!

                              EDIT: works well

                              1 Reply Last reply Reply Quote 0
                              • 1 / 1
                              • First post
                                Last post
                              Buy SketchPlus
                              Buy SUbD
                              Buy WrapR
                              Buy eBook
                              Buy Modelur
                              Buy Vertex Tools
                              Buy SketchCuisine
                              Buy FormFonts

                              Advertisement