• Login
sketchucation logo sketchucation
  • Login
🤑 SketchPlus 1.3 | 44 Tools for $15 until June 20th Buy Now

ISOLATE SELECTION

Scheduled Pinned Locked Moved Plugins
7 Posts 5 Posters 3.7k 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.
  • O Offline
    onzki
    last edited by 23 Sept 2010, 15:35

    Hi there, I'm just wondering if there's a script to isolate selected layer(s)? (aside from setting up a specific scene). Thanks!


    [/hr]Dell Alienware Area-51. SKU 2021 Pro. AutoCAD 2023. Landscape design firm

    1 Reply Last reply Reply Quote 0
    • D Offline
      Dave R
      last edited by 23 Sept 2010, 16:39

      How would you use such a plugin?

      Etaoin Shrdlu

      %

      (THERE'S NO PLACE LIKE)

      G28 X0.0 Y0.0 Z0.0

      M30

      %

      1 Reply Last reply Reply Quote 0
      • T Offline
        thomthom
        last edited by 23 Sept 2010, 16:46

        Unfortunately there is no way from the ruby API to know which layers are selected.

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

        1 Reply Last reply Reply Quote 0
        • T Offline
          TIG Moderator
          last edited by 23 Sept 2010, 18:10

          Basis is...

          layer=model.layers["MyLayer"]
          seln=[]
          ents=model.active_entities.to_a
          ents.each{|e|seln<<e if e.layer==layer}
          sel=model.selection
          sel.clear
          sel.add(seln)
          ### do stuff to 'seln'
          ### or 'ents-seln'
          
          

          TIG

          1 Reply Last reply Reply Quote 0
          • O Offline
            onzki
            last edited by 25 Sept 2010, 14:56

            @dave r said:

            How would you use such a plugin?
            Right now, I just assign new scene to isolate a layer. I'm thinking if there's an isolate selection option when you right-click (menu). I guess it won't be beneficial to all. It just happened that I've been using AutoCAD for a long time and just a newbie to SKU. Maybe my workflow is still adjusting 😄


            [/hr]Dell Alienware Area-51. SKU 2021 Pro. AutoCAD 2023. Landscape design firm

            1 Reply Last reply Reply Quote 0
            • M Offline
              mitcorb
              last edited by 25 Sept 2010, 15:01

              You would be surprised at the innovations in many fields that have come about from someone thinking "out of the box." In the "open source world" many solutions are derived from contributions from the crowd, and possibly some are derived from those not distracted by the nuts and bolts (minutiae) of the problem.

              I take the slow, deliberate approach in my aimless wandering.

              1 Reply Last reply Reply Quote 0
              • D Offline
                Dave R
                last edited by 25 Sept 2010, 15:06

                Thanks for the explanation. I was just curious because layers don't isolate entities from each other in SketchUp. They only control visibility of those entities.

                Etaoin Shrdlu

                %

                (THERE'S NO PLACE LIKE)

                G28 X0.0 Y0.0 Z0.0

                M30

                %

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

                Advertisement