sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [Plugin] Archiver.rb - update

    Scheduled Pinned Locked Moved Plugins
    42 Posts 10 Posters 25.4k Views 10 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.
    • TIGT Offline
      TIG Moderator
      last edited by

      Here's v1.8

      It now has an extra menu option 'Archive Option'.
      This archives the file and then gives you a 'save_as' dialog -
      with the default new option's file-name entered as "Model[Option-01].skp" ..-02] etc.
      This 'option' 'number' is based on the highest value option found in the model's folder.
      You can overwrite an existing file if desired (you will be warned 1st).
      The current active model-window now opens with the latest option you have just saved.
      If you save a model as an 'option', then to be recognised as such it should have its name in the format "Model[Option-nn].skp" - it must have the surrounding "[..]" and a separating "-" between the number and any text; the string "Option" could be set in the save_as dialog to say something else, BUT since new options always use "[Option-nn]" anyway it's recommended to leave it unchanged.

      Please test and feedback...


      Archiver.rb

      TIG

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

        Here's v1.9
        Minor change to 'Archive Option' - the original model is now saved immediately before it is archived and then saved as an Option.

        Usage:

        Pick 'Archiver' to make an archive copy of the current model.
        It saves the model (in its current state) into a sub-folder
        within the model's folder called 'Archives'. It's named with
        a [suffix] - date (yy-mm-dd_hh-mm-ss),
        e.g. Model[09-12-18_12-34-56].skp.
        The separators can be customized from '-' to '' etc,
        just change one line - sep="-" to sep="
        " etc...
        If later on you don't save the main model with those changes
        then that archive copy still has those changes current at the
        time of the archiving.

        If there is an 'Archives' folder then an extra 'File' menu
        item is added - "Open Archives"...

        'Archive Option' is an additional function that saves the model as it
        stands - say 'Model.skp' - then it makes an archive of it - say
        'Model[09-04-16_12-25-05].skp' and then opens a 'save_as' dialog in
        which it will have preset the next available unused Option name - say
        'Model[Option-01].skp' - which you are prompted to save_as: you can
        choose to overwrite an earlier option if desired - if so you are
        warned about overwriting it. The Options are kept in the same folder
        as the original. It is recommended that you do not change the naming
        convention... The model is then saved. The current SketchUp window
        then shows this latest Option.
        Options can be archived in the same way as other models - in the
        example above the archive's name might then be
        'Model[Option-01][09-04-16_12-30-55].skp'...
        If you subsequently use 'Archive Option' on an 'Option' itself it then
        names the new Option with the next available free Option name - in
        this case it would 'Model[Option-02].skp' and the process repeats...

        characters as separators so don't change the Option's

        name if you want it to be recognised as one by 'Archive Option'.
        Feedback please...


        Archiver.rb

        TIG

        1 Reply Last reply Reply Quote 0
        • jeff hammondJ Offline
          jeff hammond
          last edited by

          i'm not sure if i'm using 1.9 properly but here's what i'm getting...

          it works the same as 1.7 in that if i select file->archiver, a archive will be created in a new folder inside the main model's folder.. file->open archives will allow me to search through/open files in the archive folder..
          everything is fine there..

          now,
          if i select file->archive option it works exactly the same as when i use file->archiver except i now have a .tmp (ex- 1239979595.tmp) file saved in the main model's folder. no dialogs or options etc..

          dotdotdot

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

            Sounds like a Mac problem [again]. Works fine on PC. Please run it with the Ruby Console open and report the error you get. The .tmp file is made so that the original and newly named copy can swap over - that's failing...

            TIG

            1 Reply Last reply Reply Quote 0
            • jeff hammondJ Offline
              jeff hammond
              last edited by

              here's the error message:

              @unknownuser said:

              Error: #<Errno::ENOENT: No such file or directory - \Users\jethro\Desktop\ARCHIVER_TEST>
              /Library/Application Support/Google SketchUp 7/SketchUp/Tools/Archiver.rb:214:in open' /Library/Application Support/Google SketchUp 7/SketchUp/Tools/Archiver.rb:214:in entries'
              /Library/Application Support/Google SketchUp 7/SketchUp/Tools/Archiver.rb:214:in `option'
              /Library/Application Support/Google SketchUp 7/SketchUp/Tools/Archiver.rb:255

              that is after i have a model folder (ARCHIVER_TEST) with a couple of archives saved (they are in a folder created by the ruby called 'Archives' which resides inside the main folder.

              it's looking like \ vs. / again?

              dotdotdot

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

                It was \ versus / ! I suspected it - I have made an error in one step in the sub-routine for 'option'. I have just redone all of the path bits to ensure PC/Mac compatibility...

                Here's v2.0 - it works OK on my PC AND should now work on your Mac too...

                Sorry for the problem - I don't have access to a Mac to test this, so please report back...

                For the latest version please see the PluginStore http://sketchucation.com/pluginstore?pln=Archiver

                TIG

                1 Reply Last reply Reply Quote 0
                • jeff hammondJ Offline
                  jeff hammond
                  last edited by

                  ok, that fixed it..

                  i only had a quick look at it as i'm about to leave for the day but it looks like there will only be one archives folder created now and i can view all the files related to the main folder via 'Open Archives'.

                  is that correct? if so, i like it!

                  i'll be able to check it out more thoroughly tonight but it's looking like a nice improvement.

                  thanks

                  dotdotdot

                  1 Reply Last reply Reply Quote 0
                  • ToboboT Offline
                    Tobobo
                    last edited by

                    Thanks TIG

                    Toby

                    Philippians 4:13

                    I can do everything through him who gives me strength.

                    1 Reply Last reply Reply Quote 0
                    • K Offline
                      kaas
                      last edited by

                      Could it be this plugin could use an update for V2014? If I use the Archiver option in the file menu - the current file gets renamed to some 10 digit name.tmp and no copy is made to the Archiver sub-directory. Windows7 X64

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

                        @kaas said:

                        Could it be this plugin could use an update for V2014? If I use the Archiver option in the file menu - the current file gets renamed to some 10 digit name.tmp and no copy is made to the Archiver sub-directory. Windows7 X64

                        Archiver is one of a few scripts that doesn't work in v2014, because they completely changed how model.save works... It IS on my list of things to fix...

                        TIG

                        1 Reply Last reply Reply Quote 0
                        • K Offline
                          kaas
                          last edited by

                          @tig said:

                          Archiver is one of a few scripts that doesn't work in v2014, because they completely changed how model.save works... It IS on my list of things to fix...

                          Great TIG. Much appreciated.

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

                            Version 2.1 is now available in the PluginStore - it is now made v2014 compatible...
                            http://sketchucation.com/pluginstore?pln=Archiver

                            TIG

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

                              Version v2.2 is now available in the PluginStore:
                              http://sketchucation.com/pluginstore?pln=Archiver
                              It has some minor coding tweaks for cross-version compatibilities.

                              TIG

                              1 Reply Last reply Reply Quote 0
                              • H Offline
                                highco
                                last edited by

                                Hi Tig,
                                Archiver is creating temp files in the directory where the *.skp model is.
                                The "Archive" folder is created, but there is nothing in there.
                                Changing the *.tmp extension to *.skp allows me to open the file ok.
                                Using Win XP 64 Bit Pro and Sketchup 8
                                Is that the way it is suppose to happen?
                                Regards

                                Terry

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

                                  It's supposed to use the tmp file as stepping stone, then rename files so you end up where you started, but with a saved 'snapshot' skp too...

                                  Anything unusual about the path where your SKP is, or its name etc ?

                                  Works OK for me...

                                  TIG

                                  1 Reply Last reply Reply Quote 0
                                  • H Offline
                                    highco
                                    last edited by

                                    TIG,
                                    Have tried it in basic directory in C:\ and the same happens.
                                    Thought it may have been something to do with using DropBox, but that is not the case.
                                    *.TMP files are created, but nothing in the archives folder.
                                    See attached,
                                    Regards
                                    Terry
                                    PS Is there any way of debugging the Ruby script from my end, if that can be of any assistance,
                                    Regards
                                    T


                                    Archiver Temp Files.JPG

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

                                      Using something like a Dropbox synced folder could be causing the issue...
                                      What version of SketchUp are you using, OS etc? [scant User Profile info!]
                                      Do you have FULL security permissions to read / write to the Model [SKP's] folder and the nested 'Archives' folder ?

                                      It works fine for me and many others, so clearly something is adrift...

                                      If you run it with the Ruby Console open are there any error messages ?

                                      TIG

                                      1 Reply Last reply Reply Quote 0
                                      • R Offline
                                        rv1974
                                        last edited by

                                        I have exactly the same issue. The previous version still works fine on W7 x64 SU13.

                                        1 Reply Last reply Reply Quote 0
                                        • TutorialsUpT Offline
                                          TutorialsUp
                                          last edited by

                                          Thanks for the Plugin
                                          Can you please add an option thats create an Archive file automatically after a specified period of time?
                                          Eg: Auto-Archive After every 15 minutes or auto-archive on each Auto-save (time set in preference> general)

                                          I would love this feature because most of the time I forget to Archive. And can't go back enough.

                                          Thanks again.

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

                                          Advertisement