• Login
sketchucation logo sketchucation
  • Login
โ„น๏ธ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

Group By Layer? Is there a plugin?

Scheduled Pinned Locked Moved Plugins
8 Posts 7 Posters 2.9k 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.
  • S Offline
    Scostumatu
    last edited by 11 Sept 2012, 06:24

    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 11 Sept 2012, 09:17

      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 11 Sept 2012, 09:50

        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
        • P Offline
          pilou
          last edited by 11 Sept 2012, 15:05

          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
          • T Offline
            TIG Moderator
            last edited by 11 Sept 2012, 16:17

            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
            • G Offline
              Gaieus
              last edited by 11 Sept 2012, 17:02

              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 27 Sept 2018, 18:26

                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
                • J Offline
                  JQL
                  last edited by 11 Aug 2022, 14:58

                  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