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

    [Plugin] Snapshot – (1.0.1) — updated 09.10.2012

    Scheduled Pinned Locked Moved Plugins
    74 Posts 12 Posters 54.8k Views 12 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
      Aerilius
      last edited by

      It now works also in SketchUp 7 (there was a very small error that prevented that completely). The toolbars can only be changed when SketchUp is opened again (we cannot do anything about that).

      @glro said:

      An extension to the plugin might be a button that would open a specific file browser (like Xnview) and by looking through the thumbnails, would open the sketchup model by clicking on the thumbnail

      That would require to know from a thumbnail's name where the skp file is located, but it's difficult if all thumbnails are in the same folder. Better would be to integrate the large thumbnails in the operating system's thumbnail system (but I don't know how to do that on Windows, as far as I understand it would require C programming).

      @simon le bon said:

      The "save the name-1" is less evident. Previously I thought it was adding at the end of the file name a decrementation -1 -2 -3 etc..

      Sorry, I had understood it would decrease the number (to redo older images). So instead of a minus button, you would prefer something like "increase primary version number" and "secondary version number"?

      @simon le bon said:

      What I can regret is that this "Save a copy as" doesn't generates a Snapshot when Autosave is checked.

      That would be good! Unfortunately the SketchUp Ruby API tells us only what model is saved, not where. So I can get the location of the working model, not of "Save as". Good request for a next SketchUp version!
      Tell me when you find out more about the "The foxy method"...

      1 Reply Last reply Reply Quote 0
      • D Offline
        driven
        last edited by

        Works on mac,

        to attach to the skp file...
        Take your picture,
        then >> right-click on the SU title >> select the containing folder >> select the new png >> right-click >> services >> create icon and preview [need GraphicConverter installed] >> click on same_name.skp >> right click >> more info >> drag the same_name.png icon onto the more info box icon [top left] >> close more info.

        enjoy in coverflow.
        john

        learn from the mistakes of others, you may not live long enough to make them all yourself...

        1 Reply Last reply Reply Quote 0
        • G Offline
          glro
          last edited by

          thumbnails must all be in the same folder, to create a data base from which the user can search for a skp file

          C, or java programming would be needed, yes; to create a special file browser hat would add a meta data (the link to the skp file)

          Xnview can add meta dat, but the link tothe file is not active


          meta data xnview

          1 Reply Last reply Reply Quote 0
          • G Offline
            glro
            last edited by

            @aerilius said:

            @glro said:

            An extension to the plugin might be a button that would open a specific file browser (like Xnview) and by looking through the thumbnails, would open the sketchup model by clicking on the thumbnail

            That would require to know from a thumbnail's name where the skp file is located, but it's difficult if all thumbnails are in the same folder. Better would be to integrate the large thumbnails in the operating system's thumbnail system (but I don't know how to do that on Windows, as far as I understand it would require C programming).
            ...

            maybe just a shortcut to the skp file, created by the pluging when the picture is taken, and stored in the same folder
            is it possible to create a shortcut to a file using ruby?

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

              @driven said:

              Works on mac

              Great! I think there was once a discussion about integrate better thumbnails on OS X, as far as I remember that would require XCode and Objective C (?). I couldn't do it and can't test it.
              If GraphicsConverter has a command line interface, that would make it much easier!

              @glro said:

              C, or java programming would be needed, yes; to create a special file browser hat would add a meta data (the link to the skp file)

              That would be almost reinventing the wheel 😉 . I would prefer using the system's thumbnailing (Windows Vista+ uses a thumbnail folder and a database). We would need to register a thumbnail to the database. As far as I know, there are only APIs for C(++, # ...) and I have not enough experience. I will see if someone else can help me, or if we can get equivalent improvements into SketchUp.

              @glro said:

              is it possible to create a shortcut to a file using ruby?

              That might be a the easiest solution! I'll try it!

              1 Reply Last reply Reply Quote 0
              • kenK Offline
                ken
                last edited by

                Aerilius

                Would it be possible to make the selection to save, such that I can save in a "custom folder" and the "same Folder as skp" at the same time. This way I would have the master png's in my custom folder and work related png's at the skp's folder.

                If I know the work related folder, I would just browse at that location, if I wasn't sure or was looking for something that I haven't worked on for some time, I could go to the custom folder.

                Also, I could print out a contact sheet for the custom folder for a hard copy.

                So this morning, I have been opening and saving skp files to get my master folder up to date.

                Thank you for this very helpful plugin.

                Ken

                Fight like your the third monkey on Noah's Ark gangway.

                1 Reply Last reply Reply Quote 0
                • D Offline
                  driven
                  last edited by

                  @aerilius said:

                  If GraphicsConverter has a command line interface, that would make it much easier!

                  It does, and it's free[if your scint], you can also use it to extract the SU thumbnails from the .skp, but it's a bit random when Sketchup saves that, unless you want the silly 'styled' frame you get with 'save thumbnail'

                  I'll dig out the command line flags. an applescript wrapper might swap the icons...

                  john

                  learn from the mistakes of others, you may not live long enough to make them all yourself...

                  1 Reply Last reply Reply Quote 0
                  • bagateloB Offline
                    bagatelo
                    last edited by

                    There should be an option to enter the date and time automatically in the file name.
                    Thanks for this great tool.

                    While the cat's away, the mice will play

                    1 Reply Last reply Reply Quote 0
                    • G Offline
                      glro
                      last edited by

                      @aerilius said:

                      @driven said:

                      Works on mac

                      Great! I think there was once a discussion about integrate better thumbnails on OS X, as far as I remember that would require XCode and Objective C (?). I couldn't do it and can't test it.
                      If GraphicsConverter has a command line interface, that would make it much easier!

                      @glro said:

                      C, or java programming would be needed, yes; to create a special file browser hat would add a meta data (the link to the skp file)

                      That would be almost reinventing the wheel 😉 . I would prefer using the system's thumbnailing (Windows Vista+ uses a thumbnail folder and a database). We would need to register a thumbnail to the database. As far as I know, there are only APIs for C(++, # ...) and I have not enough experience. I will see if someone else can help me, or if we can get equivalent improvements into SketchUp.

                      @glro said:

                      is it possible to create a shortcut to a file using ruby?

                      That might be a the easiest solution! I'll try it!

                      There is a simple way: creating a batch file, for example:
                      "@ECHO OFF
                      call F:\000_experience.sauvb\programmation\ruby\essai_plateforme.skp
                      end"

                      this opens the console
                      to avoid opening the console, write a second file

                      "var WindowStyle_Hidden = 0
                      var objShell = WScript.CreateObject("WScript.Shell")
                      var result = objShell.Run("cmd.exe /c shortcut.bat", WindowStyle_Hidden)"

                      both are text files, easy to write in ruby...

                      1 Reply Last reply Reply Quote 0
                      • simon le bonS Offline
                        simon le bon
                        last edited by

                        @aerilius said:

                        It now works also in SketchUp 7

                        That's great 👍 👍

                        @aerilius said:

                        @simon le bon said:

                        The "save the name-1" is less evident. Previously I thought it was adding at the end of the file name a decrementation -1 -2 -3 etc..

                        Sorry, I had understood it would decrease the number (to redo older images). So instead of a minus button, you would prefer something like "increase primary version number" and "secondary version number"?

                        It seems to me that "save the name+1" already "increase secondary version number" 😒

                        nameFile_000.skp
                        when it is saved gives: (autosave checked)
                        nameFile_000.png
                        "save the name+1" become:
                        nameFile_0001.png
                        nameFile_0002.png
                        nameFile_0003.png
                        ...

                        nameFile_001.skp
                        when it is saved gives:
                        nameFile_001.png
                        & "save the name+1" become:
                        nameFile_0011.png
                        nameFile_0012.png
                        nameFile_0013.png

                        That's not bad to consider snapshots incrementation.

                        @unknownuser said:

                        it would decrease the number (to redo older images)

                        Redo older image is not (IMO) a very necessary option. And in facts don't work pretty good.
                        If you have a png set made with "save the name+1"
                        nameFile_0001.png
                        nameFile_0002.png
                        nameFile_0003.png
                        Then you want to redo basically the last one: nameFile_0003.png , if you use "save the name-1" It is nameFile_0002.png that is overwrited !!

                        May be only one button would be necessary which would make a clear proper incrementation:

                        nameFile_001.skp
                        when saved gives:
                        nameFile_001.png
                        & "save the name + increment"
                        nameFile_001_001.png
                        nameFile_001_002.png
                        nameFile_001_003.png

                        Just idea (as Jean Lemire always says 😉 )

                        Simon

                        PS:
                        _ Sorry that "save a copy as" can't autosave a snapshot. We can take few seconds to save the snapshot name manually after all.
                        _ "The foxy method" is lost for me. I have tried with the search engine in vain. May be Gaieus knows something about it! 😉

                        1 Reply Last reply Reply Quote 0
                        • G Offline
                          glro
                          last edited by

                          @aerilius said:

                          @driven said:

                          @glro said:

                          is it possible to create a shortcut to a file using ruby?

                          That might be a the easiest solution! I'll try it!

                          i added some code to yours at the end of "self.save_as(filepath)" method

                          
                          filepath2 = (filepath.split("/")[0..-2]).join("/")
                          nom_model = m.title
                          # name of the text file to put the shortcut in
                          nom_bat = filepath2 + "/" + nom_model + ".bat"
                          	
                          #open this file
                          aFile = File.new(nom_bat,"w")
                          
                          pathmodel = m.path
                          
                          #write the file shortcut
                          aFile.puts("call "+pathmodel)
                          aFile.puts("end")
                          aFile.close
                          
                          

                          a black cmd window is opened... must be closed manually, unless you embed the .bat file in a .js file...
                          it is basic but it works...

                          1 Reply Last reply Reply Quote 0
                          • simon le bonS Offline
                            simon le bon
                            last edited by

                            Sorry to disturb the coding discussion 😕

                            Ae_Snapshot tested with Su7 : love this plug 👍 👍
                            (Png transparent background option still don't work - - )

                            simonlebon

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

                              I forgot to mention: the transparent png option has only been added to SketchUp 8.
                              I'm working on a new version!

                              1 Reply Last reply Reply Quote 0
                              • G Offline
                                glro
                                last edited by

                                @glro said:

                                @aerilius said:

                                @driven said:

                                @glro said:

                                is it possible to create a shortcut to a file using ruby?

                                That might be a the easiest solution! I'll try it!

                                i added some code to yours at the end of "self.save_as(filepath)" method

                                
                                > filepath2 = (filepath.split("/")[0..-2]).join("/")
                                > nom_model = m.title
                                > # name of the text file to put the shortcut in
                                > nom_bat = filepath2 + "/" + nom_model + ".bat"
                                > 	
                                > #open this file
                                > aFile = File.new(nom_bat,"w")
                                > 
                                > pathmodel = m.path
                                > 
                                > #write the file shortcut
                                > aFile.puts("call "+pathmodel)
                                > aFile.puts("end")
                                > aFile.close
                                > 
                                

                                a black cmd window is opened... must be closed manually, unless you embed the .bat file in a .js file...
                                it is basic but it works...

                                Doesn't work if there is a white space in the file address

                                additional code is needed

                                
                                nom_bat2 = nom_bat.to_s
                                
                                if nom_bat2.count(nom_bat2, " ") != 0
                                UI.messagebox("no white space in the file address")
                                fail
                                end
                                
                                1 Reply Last reply Reply Quote 0
                                • A Offline
                                  Aerilius
                                  last edited by

                                  I updated the plugin. I think it will now fit all your needs because you can now make your own buttons 😉
                                  @glro, can you test if the shortcuts work as expected?

                                  1 Reply Last reply Reply Quote 0
                                  • G Offline
                                    glro
                                    last edited by

                                    @aerilius said:

                                    I updated the plugin. I think it will now fit all your needs because you can now make your own buttons 😉
                                    @glro, can you test if the shortcuts work as expected?

                                    i tested, but there might be a problem

                                    no box is opened on my scree when i check "ae snapshot" in the menu

                                    it might come from the html file

                                    in the pop up windows you show in the first message of this thread, i read "create a shortcut"

                                    but when i click on the html file in "ae_snapshot" folder, i don't see the same things


                                    html settings differences

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

                                      I first thought it might have to do with upgrading the settings (because the previous version is much different). But I just tested it from 0.1.1 to 0.3.0 and it works for me.

                                      You mean the settings dialog does not appear when you click the gear icon on the toolbar (there is no ae snapshot menu). Can you open the Ruby Console, click the gear button and give me the error messages if there are any.
                                      Then copy&paste " AE::Snapshot.options={}" into the console and press the gear button again. Does it then work?

                                      1 Reply Last reply Reply Quote 0
                                      • G Offline
                                        glro
                                        last edited by

                                        @aerilius said:

                                        I first thought it might have to do with upgrading the settings (because the previous version is much different). But I just tested it from 0.1.1 to 0.3.0 and it works for me.

                                        You mean the settings dialog does not appear when you click the gear icon on the toolbar (there is no ae snapshot menu). Can you open the Ruby Console, click the gear button and give me the error messages if there are any.
                                        Then copy&paste " AE::Snapshot.options={}" into the console and press the gear button again. Does it then work?

                                        yes, the setting dialog does not appear;
                                        the gear icon does'nt appear either...
                                        just a small reactangle where i cannot click ...

                                        how do you explain the differences between the setting dialog window i get when i double click directly on the file "settings_dialog.htm" and the one you pasted in you message?

                                        my guess is that it is linked to the problem


                                        snapshot icon

                                        1 Reply Last reply Reply Quote 0
                                        • srxS Offline
                                          srx
                                          last edited by

                                          Very useful! Thank you very much.

                                          www.saurus.rs

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

                                            @glro: Does " Sketchup.write_default("Plugins_ae", "Snapshot", "{}")" on the Ruby Console and restarting help?
                                            (There are no relevant differences in the htm file.)
                                            (By the way, you don't need quote the message, I know it's on the same page one above 😉 )

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

                                            Advertisement