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

    New Script: SelectionMemory2; and update to SelectAtStartup

    Scheduled Pinned Locked Moved Developers' Forum
    6 Posts 4 Posters 1.1k Views 4 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.
    • R Offline
      RickW
      last edited by

      Okay, for everyone who ever needed to re-select what you had previously selected, here it is: SelectionMemory2.

      It remembers the last 20 selection sets, and allows you to add or remove the items in a set to/from the active selection. Unlike the original SelectionMemory, this version remembers entities as you select them, making the process automatic.

      It also works with items outside an active group, so you can have a FollowMe profile inside a group and the path outside the group. Just select the path, then go into the group with the FollowMe face. Add the path to the active selection using the dialog box or right-click>Restore Last Selection, then start the FollowMe tool and select the face in the group - it will follow the path to form the extrusion.

      SelectAtStartup was also updated to avoid conflicts with the AppObserver that helps make this work.

      RickW
      [www.smustard.com](http://www.smustard.com)

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

        Some additional notes:

        Three or more items need to be selected for the memory function to kick in (I didn't think two items was hard enough to reselect manually to bother with it in the script).

        If you start a new model or open an existing model, you'll have to close the dialog box and reopen it (sorry, it's a SketchUp thing), because the WebDialog object is tied to the model in use at the time the WebDialog object was created. Having a different model means the WebDialog can't respond to your selections any more. I included code that should close it if the model has changed, but for some reason it doesn't seem to work consistently. I'm working on fixing that, and will post when an update is available.

        NOTE: If you are running startup.rb (SelectAtStartup), you MUST download the new version, or SelectionMemory2 will not work properly.

        RickW
        [www.smustard.com](http://www.smustard.com)

        1 Reply Last reply Reply Quote 0
        • daikuD Offline
          daiku
          last edited by

          This is brilliant! How many times have I carefully selected a whole mess of objects one at a time, only to click the wrong thing and lose the selection? This really saves time and aggrevation. Well done, Rick. CB.

          Clark Bremer
          http://www.northernlightstimberframing.com

          1 Reply Last reply Reply Quote 0
          • T Offline
            tomsdesk
            last edited by

            Rick, sweet!

            This work on SU5? Are most rubys version sensitive? (Ruby Newbee here :`)

            Thanks, Tom.

            http://www.tomsdesk.moonfruit.com/
            2.5D Trees & Shrubs!

            1 Reply Last reply Reply Quote 0
            • EdsonE Offline
              Edson
              last edited by

              thanks, rick. it is good to see a good script get even better.

              regards.

              edson

              edson mahfuz, architect| porto alegre • brasil
              http://www.mahfuz.arq.br

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

                SelectionMemory2 and SelectAtStartup both rely on Observers, a new ruby feature exclusive to SketchUp 6.

                Sorry...

                But thanks for the question - I need to put that on the website.

                RickW
                [www.smustard.com](http://www.smustard.com)

                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