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

    Cool plugin idea

    Scheduled Pinned Locked Moved Plugins
    17 Posts 8 Posters 2.2k Views 8 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.
    • S Offline
      sahi
      last edited by

      Records of recent files are stored here

      HKEY_USERS/S-1-5-21-1123561945-651377827-1644491937-500/SOFTWARE/Google/SketchUp7/Recent File List
      
      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        A combo of both those would be needed - the observer to detect when to re-read the recent list in the registry.
        But where is the list stored on OSX?

        Thomas Thomassen — SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

        1 Reply Last reply Reply Quote 0
        • P Offline
          pichuneke
          last edited by

          I had another idea, but I don't know if it may be useful.

          .skz extension. You save the file to .skp, the plugin compresses it to .zip, and changes the extension from .zip to .skz.

          Size of archives may be much smaller with sketchup files. Of course, the plugin reads .skz files too.

          Forgive my spanglish...

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

            @thomthom said:

            There are some problems:

            1. Not sure if there is a way to get the list of last used models.
            2. There is no way to change the toolbar icons for buttons that has already been created (Webdialog might be an alternative to toolbar - would allow user to vary the size of the thumbs - 24px and 16px isn't much of an icon...)
            3. It's problematic getting the thumbnails for SketchUp models via SU Ruby

            This is an outline of what's needed...
            You use [already made] a registry/plist entry for the Sketchup App' as 'RecentSKPs', 'Item0, 'Item1', 'Item2' etc up to 'Item11' - there are say 12 in all to allow for non-existent SKP's later [it only uses the first 6 out of the 12 anyway].
            They are each set to '' initially and get populated with a file-path as you use the tool later...
            You need the tool to run on 'Save' [using ModelObserver.onSaveModel(model)] and to read the model's file-path and also to read the Sketchup App' RecentSKPs-set [all 12 items], making an array of the saved file-paths from each of these 'Items'.
            It unique array from it - finding duplicate paths and removing them [noting their 'index' for the icons' updating too***], and it therefore removes duplicated file-paths if the file were already saved earlier with that path.
            It also removes any entries where the Files.exist?(file_path) returns ' false' - i.e. the file no longer exists.
            If there are then fewer than 12 items then it pads out any later items in the array with ''.
            It then uses the 12 item array to rewrite the registry/plist entries for the Sketchup App' 'RecentSKPs' 'Item0', 'Item1', 'Item2' etc up to 'Item11'.
            It then uses the first 6 of these values to make the webdialog's html dynamically, this varies as as the list registry/plist entries changes...
            The related 'icon' files are made by using view.write_image(...) as each SKP is saved. This PNG image is saved into a folder in ../Plugins/ [taken from the Ruby's file location?] called ../RecentSKPicons/ each PNG is named 0.png, 1.png, 2.png etc up to 11.png. ***As the registry/plist entries are updated/deleted the equivalent PNG is either deleted or renamed to match its equivalent registry/plist Item reference - the latest file-path's PNG is always called 0.png.
            This is a major 'managenent' headache... BUT it is quite doable...
            Clicking on a SKP's name or its icon in the dialog [which can be open at all times and minimized when not in use?] opens that SKP file.
            🤓

            TIG

            1 Reply Last reply Reply Quote 0
            • BoxB Offline
              Box
              last edited by

              Just as a heads up, Win 7 allows a right click in the task bar which gives you the last 10 opened files.

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

                We're trying to find a 'cross-platform' solution though...

                TIG

                1 Reply Last reply Reply Quote 0
                • thomthomT Offline
                  thomthom
                  last edited by

                  Adding to TIGs design specs:

                  With a crude PNG sniffer one can get the thumbnails for unopened .skp files. (I have such a sample already)

                  You could get away with just one temp thumbnail file, to use when writing out thumbnails from opened files. After writing it you can read it into ruby and pass it to the webdialog in base64 format and use that in a data URI. http://en.wikipedia.org/wiki/Data_URI_scheme (Note that this requires IE8 or newer)

                  Thomas Thomassen — SketchUp Monkey & Coding addict
                  List of my plugins and link to the CookieWare fund

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

                    Wow 😲

                    I hope this works!

                    is anyone activly working on it?

                    "...And if he says that one more time i'll punch him right in the throat" - Armstrong and Getty
                    My website http://dragoonprogramming.weebly.com/

                    1 Reply Last reply Reply Quote 0
                    • thomthomT Offline
                      thomthom
                      last edited by

                      I am not, unfortunately. Caught up in some other projects right now.

                      Thomas Thomassen — SketchUp Monkey & Coding addict
                      List of my plugins and link to the CookieWare fund

                      1 Reply Last reply Reply Quote 0
                      • BoxB Offline
                        Box
                        last edited by

                        @tig said:

                        We're trying to find a 'cross-platform' solution though...

                        I understand that Tig, I just mentioned it because I thought perhaps some of the coding from Win 7 might help to make it work.

                        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