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

    Group By Layer? Is there a plugin?

    Scheduled Pinned Locked Moved Plugins
    8 Posts 7 Posters 2.9k Views 7 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
      Scostumatu
      last edited by

      Hi

      I have an imported archicad file into SKP and its broken up in layers nicely... but not grouped.

      Is there a plugin that can group these layers?

      Thanks
      S

      1 Reply Last reply Reply Quote 0
      • A Offline
        ArCAD-UK
        last edited by

        I have a Scene that turns off all layers apart from layer zero. If you do the same then you can just step throught turning on each layer one at a time and grouping what is on screen (Ctrl-A then group). If there are entities on layer zero you may need to group and move them to a new layer, as layer zero will keep reverting to default and become visible.

        The above assumes you don't have any entities "Hidden" in the scene as they won't be picked up in the grouping process.

        So simple it could take longer to write the plugin, but TIG πŸ€“ hasn't commented yet...

        1 Reply Last reply Reply Quote 0
        • S Offline
          Scostumatu
          last edited by

          so simple im embarassed i didnt think of it πŸ˜„

          thnaks for your help!

          @arcad-uk said:

          I have a Scene that turns off all layers apart from layer zero. If you do the same then you can just step throught turning on each layer one at a time and grouping what is on screen (Ctrl-A then group). If there are entities on layer zero you may need to group and move them to a new layer, as layer zero will keep reverting to default and become visible.

          The above assumes you don't have any entities "Hidden" in the scene as they won't be picked up in the grouping process.

          So simple it could take longer to write the plugin, but TIG πŸ€“ hasn't commented yet...

          1 Reply Last reply Reply Quote 0
          • pilouP Offline
            pilou
            last edited by

            Even entities are on other Layers they are always on the Layer 0! They are just hidden πŸ˜„
            Layers in Sketchup are only visibility layers, not geometry layers πŸ˜‰

            Frenchy Pilou
            Is beautiful that please without concept!
            My Little site :)

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

              Another quick way would be to select an object on a layer and note its layer-name from the open 'Entity Info' window, then context-menu > Select on same layer... context-menu > Make Group... group is selected in the still 'Entity Info' window type in it's name based on its layers.
              If you want the group to be on the same layer change its layer in 'Entity Info' too... if you want objects within the group to be on Layer0 then edit the group, Edit>SelectAll [Ctrl+A] and again use 'Entity Info' to change the layer to Layer0...

              This one liner does that on all active_entities...

              m=Sketchup.active_model;a=m.active_entities;s=[];m.start_operation("!");a.to_a.each{|e|s<<e if e.layer==m.layers[0]};g=a.add_group(s);g.name=m.layers[0].name;g.layer=nil;(g.entities.each{|i|i.layer=nil})unless s.empty?;m.layers.to_a[1..-1].each{|l|s=[];a.to_a.each{|e|s<<e if e.layer==l};next if s.empty?;g=a.add_group(s);g.name=l.name;g.layer=l;g.entities.each{|i|i.layer=nil};};m.commit_operation;
              

              Copy/Paste into the Ruby Console + <enter>...

              TIG

              1 Reply Last reply Reply Quote 0
              • GaieusG Offline
                Gaieus
                last edited by

                And here is a plugin, too: http://www.smustard.com/script/GroupByLayer

                Gai...

                1 Reply Last reply Reply Quote 0
                • J Offline
                  Jorgensen
                  last edited by

                  I have used this plugin for years and it works just fine, but.....
                  Sometimee it takes forever to group_by_layer.

                  Does anyone know if there is a fastplugin or an other way to group by layer?

                  Thanks
                  Jorgensen

                  sketchup pro 2016 16.1.1449 64 bit | windows 10 pro | i7-3770k @3.5 GHz | 16gb ram | gtx 780 ti / gtx 980 ti | nvidia driver 368.39

                  1 Reply Last reply Reply Quote 0
                  • JQLJ Offline
                    JQL
                    last edited by

                    I want to do exactly what Tig described in one of my models. (Anytime I import a survey actually)

                    In Smustard's plugin posted by Gaieus, the description says the following:

                    @unknownuser said:

                    Explodes all groups and components, then regroups all entities by layer

                    Does Tig's snippet simply run through the selection organizing geometry (edges and faces) by group by layer as described?

                    Or does it explode whatever it finds first? Because in my model I have some components that I want to keep.

                    www.casca.pt
                    Visit us on facebook!

                    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