sketchucation logo sketchucation
    • Login
    Oops, your profile's looking a bit empty! To help us tailor your experience, please fill in key details like your SketchUp version, skill level, operating system, and more. Update and save your info on your profile page today!
    Mac User? | Join the Rayscaper Beta for Mac Learn More

    [Plugin] Script selects the line or face.(UPDATED 15/02/16)

    Scheduled Pinned Locked Moved Plugins
    26 Posts 15 Posters 24.1k Views 15 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
      snakeysnape
      last edited by

      Hi All,

      I wonder if anybody else is experiencing it, but this plug-in don't work for me when I use it with SU 2014. Previously in SU8 with select face toggled on even if I triple click a model only face would be selected as expected but for SU2014 edges are included in the selection.
      I hope this gets resolved, as its been a real helpful plugin for me.

      1 Reply Last reply
      Reply Quote 0
      • sdmitchS
        sdmitch
        last edited by

        I have experienced the same results. Works perfectly in SU8 but fails in SU2014 with no errors reported in the Ruby Console.

        Nothing is worthless, it can always be used as a bad example.

        http://sdmitch.blogspot.com/

        1 Reply Last reply
        Reply Quote 0
        • cottyC
          cotty
          last edited by

          @snakeysnape said:

          I hope this gets resolved, as its been a real helpful plugin for me.

          Until then, you can use Thomthoms selections toys as an alternative for this task.

          my SketchUp gallery

          1 Reply Last reply
          Reply Quote 0
          • sdmitchS
            sdmitch
            last edited by

            The code

            edges=sel.grep(Sketchup;;Edge); sel.clear; sel.add edges
            

            works in SU2014 but causes a stack error that crashes SU8.

            Nothing is worthless, it can always be used as a bad example.

            http://sdmitch.blogspot.com/

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

              @sdmitch said:

              The code...
              works in SU2014 but causes a stack error that crashes SU8.

              on mac both

              sel=Sketchup.active_model.selection
              edges=sel.grep(Sketchup;;Edge).to_a; sel.clear; sel.add edges
              
              sel=Sketchup.active_model.selection
              edges=sel.grep(Sketchup;;Edge); sel.clear; sel.add edges
              

              work in v8 and v2014

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

              1 Reply Last reply
              Reply Quote 0
              • sdmitchS
                sdmitch
                last edited by

                Apparently my v8 is different because it still crashes with that addition.

                Nothing is worthless, it can always be used as a bad example.

                http://sdmitch.blogspot.com/

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

                  my test file had less than 2000 edges so is it a limit?
                  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
                  • sdmitchS
                    sdmitch
                    last edited by

                    No I was using a small sample consisting of 3 or 4 faces.

                    I did find a solution that works in both SU8 and SU2014 and that was to remove the observer before processing the selection and add it back after while using the selection processing code previously posted.

                    	def onSelectionBulkChange(selection)
                    		Sketchup.active_model.selection.remove_observer self
                    		get_selection_edge(selection) if(@select_edge)
                    		# get_selection_edge_smooth(selection) if(@edge_smooth)
                    		get_selection_face(selection) if(@select_face)
                    		Sketchup.active_model.selection.add_observer self
                    	end
                    
                    

                    Nothing is worthless, it can always be used as a bad example.

                    http://sdmitch.blogspot.com/

                    1 Reply Last reply
                    Reply Quote 0
                    • S
                      snakeysnape
                      last edited by

                      Hi Sdmitch,

                      Sorry but can you post the fixed plugin in here? I am confused as to where to put the selection code.

                      thanks

                      1 Reply Last reply
                      Reply Quote 0
                      • sdmitchS
                        sdmitch
                        last edited by

                        @snakeysnape said:

                        Hi Sdmitch,

                        Sorry but can you post the fixed plugin in here? I am confused as to where to put the selection code.

                        thanks

                        With apologies to Sahi.


                        selection_edge.rb

                        Nothing is worthless, it can always be used as a bad example.

                        http://sdmitch.blogspot.com/

                        1 Reply Last reply
                        Reply Quote 0
                        • S
                          snakeysnape
                          last edited by

                          Thanks sdmitch,

                          Thanks also to Sahi hope you don't feel bad we've 'hijacked' your plugin.

                          1 Reply Last reply
                          Reply Quote 0
                          • P
                            Pu
                            last edited by

                            not work. (sketchup 2014)

                            1 Reply Last reply
                            Reply Quote 0
                            • C
                              clausgs
                              last edited by

                              @sahi said:

                              The script selects the line or face.

                              The first icon >> click on it - and only the lines stand out >> again click on it >> disables script

                              The second icon >> click on it - and distinguished only by persons >> again click on it deactivates the script >>
                              [attachment=0:7ckaz2yc]<!-- ia0 -->selection_edge.zip<!-- ia0 -->[/attachment:7ckaz2yc]

                              Hi Sahi

                              Have used this plugin for a long time, but now it do not work in SU 2015 ?
                              Can you fix that?

                              Thanks for your great support...
                              Claus
                              ClausGS

                              Posts: 17
                              Joined: 20 Jun 2009 10:12

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

                                @Claus,

                                if you open the file in notepad++ and find and replace...

                                if you have the original version

                                 sel.each
                                

                                to

                                 sel.to_a.each
                                

                                or if you have sdmitch [faster] version

                                sel.grep
                                

                                to

                                sel.to_a.grep
                                

                                this works in v2015 for me...
                                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
                                • H
                                  HirokaMatsuiko2015
                                  last edited by

                                  thank you for this tool im using it right now

                                  if its possible to request
                                  add shortcut keys with toggling selection tool

                                  right now when paradigm or changing between tools i need to hit ( Face Select > Spacebar ) or ( Edge Select > Spacebar )

                                  i think its more convenient in one keys
                                  like for example if hit X key it will also toggle the selection keys

                                  similar to other 3D software

                                  1 Reply Last reply
                                  Reply Quote 0
                                  • S
                                    sahi
                                    last edited by

                                    Updated the plug-in in the first message

                                    1 Reply Last reply
                                    Reply Quote 0

                                    Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                                    Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                                    With your input, this post could be even better đź’—

                                    Register Login
                                    • 1
                                    • 2
                                    • 2 / 2
                                    • First post
                                      Last post
                                    Buy SketchPlus
                                    Buy SUbD
                                    Buy WrapR
                                    Buy eBook
                                    Buy Modelur
                                    Buy Vertex Tools
                                    Buy SketchCuisine
                                    Buy FormFonts

                                    Advertisement