• Login
sketchucation logo sketchucation
  • Login
πŸ€‘ SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

[Plugin] zoom_selection.rb

Scheduled Pinned Locked Moved Plugins
21 Posts 11 Posters 19.3k Views
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.
  • J Offline
    Jim
    last edited by Jim 19 Nov 2007, 05:27

    About

    zoom_selection.rb adds 2 items under the Camera menu; Zoom Selection and Zoom Out.

    • Zoom Selection zooms to the selected item(s). If nothing is selected it zooms to the model extents.
    • Zoom Out zooms out by a factor of 2.

    Suggested Usage

    I set up 2 key Shortcuts. I use the 'z' key mapped to Zoom Selection, and 'Shift-Z' to Zoom Out.

    Compatability

    I'm not sure if SU5 had the ruby methods available. I don't believe it did, in which case this is for SU6 or later. Can someone confirm?

    Installation

    Download and move zoom_selection.rb into your Plugins folder, restart SketchUp.

    zoom_selection.rb

    Script Authors
    Script writers can call the methods also:

    
    JF;;zoomSelection
    JF;;zoomOut(factor) # the larger the factror, the larger the zoom out
    
    

    Hi

    1 Reply Last reply Reply Quote 0
    • S Offline
      Stu
      last edited by 19 Nov 2007, 05:29

      Jim,
      Another good one ❗
      Don't stop now, mate, your on a roll ❓
      πŸ˜„

      http://www.landesign.com.au

      1 Reply Last reply Reply Quote 0
      • D Offline
        Didier Bur
        last edited by 19 Nov 2007, 05:29

        Hi Jim,
        I confirm this is for V6 only.
        A context menu would be handy too ! πŸ˜‰

        DB

        1 Reply Last reply Reply Quote 0
        • J Offline
          Jim
          last edited by 19 Nov 2007, 05:30

          @didier bur said:

          Hi Jim,
          I confirm this is for V6 only.
          A context menu would be handy too ! πŸ˜‰

          Thanks Didier. There is a (mis-named) Zoom Extents context menu already in V6 - right-click > Zoom Extents. I could have used a simple key-shortcut to Edit/Item/Zoom Extents, but I think the single key shortcut to zoom to selection, or zoom to model extents makes for a better experience.

          Hi

          1 Reply Last reply Reply Quote 0
          • E Offline
            Edson
            last edited by 19 Nov 2007, 05:31

            jim,

            the plugin is not working for me exactly as expected. for instance, when editing some group/component inside another group/component, what is taken as extents is not the object selected inside the group/component but the outside extents of the group.

            i hope i made myself clear.

            thanks.

            edson mahfuz, architect| porto alegre β€’ brasil
            http://www.mahfuz.arq.br

            1 Reply Last reply Reply Quote 0
            • E Offline
              Edson
              last edited by 19 Nov 2007, 05:31

              jim,

              forget it. i made it work by creating another shortcut. thanks for the very useful plugin.

              edson

              edson mahfuz, architect| porto alegre β€’ brasil
              http://www.mahfuz.arq.br

              1 Reply Last reply Reply Quote 0
              • P Offline
                Pixero
                last edited by 19 Nov 2007, 05:32

                I made a zoom selection a while ago. Even simpler.
                You can find it under downloads at my site.
                http://www.pixero.com

                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jim
                  last edited by 19 Nov 2007, 05:33

                  I've made a minor mod to this. After zooming in, I always find myself scrolling out just a little, so I added this "back-off" to the script.

                  301 Moved Permanently

                  favicon

                  (www.sketchucation.com)

                  Hi

                  1 Reply Last reply Reply Quote 0
                  • T Offline
                    TIG Moderator
                    last edited by 19 Nov 2007, 05:34

                    Sorry for some bad news... Sketchup.send_action("viewZoomToSelection:") has zoomed the selection for some time !

                    Also if you select something and right-click there is a context-menu for this called "Zoom Extents" (Should be called Zoom Selection but lazy bug fixers !)

                    You can also shortcut key it to Z (I do already) by selecting something and then opening the Preferences Window and Shortcut option, filter for 'Zoom Ex' and you'll get Edit/Item/Zoom Extents - set the Z key to that...

                    Don't feel bad I have reinvented several inbuilt functions in my time !

                    TIG

                    1 Reply Last reply Reply Quote 0
                    • J Offline
                      Jim
                      last edited by 19 Nov 2007, 05:35

                      @tig said:

                      Sorry for some bad news... Sketchup.send_action("viewZoomToSelection:") has zoomed the selection for some time !

                      Also if you select something and right-click there is a context-menu for this called "Zoom Extents" (Should be called Zoom Selection but lazy bug fixers !)

                      You can also shortcut key it to Z (I do already) by selecting something ans then opening the Preferences Window and Shortcut option, filter for 'Zoom Ex' and you'll get Edit/Item/Zoom Extents - set the Z key to that...

                      Don't feel bad I have reinvented several inbuilt functions in my time !

                      Thanks TIG, the difference is that if nothing is selected, my zoom selected does a zoom extents. In addition, I add a little extra zoom-out to fit my zooming tastes. A minor enhancement perhaps, but I miss it when it's not there.

                      Hi

                      1 Reply Last reply Reply Quote 0
                      • H Offline
                        humanticnc
                        last edited by 19 Nov 2007, 05:37

                        I say thank you for it much RB work
                        humanticnc πŸ˜„

                        [kecsaphu]

                        1 Reply Last reply Reply Quote 0
                        • H Offline
                          hoangpi
                          last edited by 12 Nov 2010, 08:07

                          Thanks alot!

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            rv1974
                            last edited by 19 Aug 2012, 06:41

                            It'd act as 'zoom extents' when nothing selected (a-la 3ds max)
                            Jim could you expand this rb please?

                            1 Reply Last reply Reply Quote 0
                            • J Offline
                              Jim
                              last edited by 19 Aug 2012, 15:34

                              @rv1974 said:

                              It'd act as 'zoom extents' when nothing selected (a-la 3ds max)
                              Jim could you expand this rb please?

                              This is what it does.

                              Hi

                              1 Reply Last reply Reply Quote 0
                              • R Offline
                                rv1974
                                last edited by 19 Aug 2012, 16:23

                                @jim said:

                                @rv1974 said:

                                It'd act as 'zoom extents' when nothing selected (a-la 3ds max)
                                Jim could you expand this rb please?

                                This is what it does.

                                Jim thanks for attention.
                                I'm afraid it doesn't.
                                What I mean is the ruby should:

                                1. When nothing selected it'd zoom out (not zoom out by a factor of 2). It'd respect group\component extends while editing with the 'hide the rest of model' mode .
                                2. With item selected it'd zoom to object (no complains it's already OK).
                                3. It'd be 'two in one' command: one shortcut for 2 states (see p.1&2)
                                  Edit: If I already got you 😎 could you please-please-please add the scale tweaking to your Mover 2? I love this tool but random\exact\by axys scaling is really missing.
                                  Thank you in advance.
                                1 Reply Last reply Reply Quote 0
                                • halroachH Offline
                                  halroach
                                  last edited by 7 May 2013, 10:21

                                  This plugin is a wonderful idea when I have an imported DWG with real far away geometry that I'd like to select "blindly" geometry that I cannot see. I've tried it though, placing a bunch of components at the 0,0,0 and one component far - 1000 meters away... I select the far away component and it just won't zoom on it... it kind of zooms to extents or something similar, cause if I zoom extents I get something else... ideas?

                                  FlexTools - Super Quick Windows, Doors, Slats...

                                  1 Reply Last reply Reply Quote 0
                                  • Dave RD Offline
                                    Dave R
                                    last edited by 7 May 2013, 12:52

                                    The native Zoom Extents is an interesting tool. If you use Zoom extents from the toolbar, it zooms to fit all of the model that is displayed. If you make a selection and use Zoom Extents from the Context menu, it zooms to the selection.

                                    Often, when I import a CAD file or open a SketchUp file from someone else, I hit Zoom Extents on the toolbar. If the camera zooms out so the obvious geometry is relatively small in the model space, I drag a right to left selection box around the apparently empty space making sure I don't get any of the model. Then I hit Delete and Zoom Extents again to see if I've removed the unneeded stuff.

                                    Etaoin Shrdlu

                                    %

                                    (THERE'S NO PLACE LIKE)

                                    G28 X0.0 Y0.0 Z0.0

                                    M30

                                    %

                                    1 Reply Last reply Reply Quote 0
                                    • halroachH Offline
                                      halroach
                                      last edited by 7 May 2013, 13:42

                                      @dave r said:

                                      Often, when I import a CAD file or open a SketchUp file from someone else, I hit Zoom Extents on the toolbar. If the camera zooms out so the obvious geometry is relatively small in the model space, I drag a right to left selection box around the apparently empty space making sure I don't get any of the model. Then I hit Delete and Zoom Extents again to see if I've removed the unneeded stuff.

                                      That is exactly what I do. I zoom extents and select the geometry I can't see and delete it. I was hoping though that with this plugin I could zoom in to the selected geometry to see what it is that I am going to be deleting... but it just won't zoom...

                                      FlexTools - Super Quick Windows, Doors, Slats...

                                      1 Reply Last reply Reply Quote 0
                                      • Dave RD Offline
                                        Dave R
                                        last edited by 7 May 2013, 13:45

                                        So use Zoom Extents from the Context menu.

                                        I used to have a Zoom Extents on a custom toolbar that Jim did that would zoom in to the selection. I'll see if I can find it.

                                        Etaoin Shrdlu

                                        %

                                        (THERE'S NO PLACE LIKE)

                                        G28 X0.0 Y0.0 Z0.0

                                        M30

                                        %

                                        1 Reply Last reply Reply Quote 0
                                        • Dave RD Offline
                                          Dave R
                                          last edited by 7 May 2013, 14:44

                                          Check this out.

                                          There's a command for Center Selection which would probably get you started. On my PC I have his toolbar set up so Zoom Extents zooms to a selection if there is one.

                                          Etaoin Shrdlu

                                          %

                                          (THERE'S NO PLACE LIKE)

                                          G28 X0.0 Y0.0 Z0.0

                                          M30

                                          %

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

                                          Advertisement