sketchucation logo sketchucation
    • Login
    ℹ️ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    Selecting all components within a component

    Scheduled Pinned Locked Moved SketchUp Discussions
    sketchup
    13 Posts 5 Posters 430 Views 5 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.
    • L Offline
      LARV
      last edited by

      If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.

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

        Use the Outliner ?
        It's possible to make multiple selections within the same context [+Ctrl]

        TIG

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

          @larv said:

          If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.

          unless file_loaded?((__FILE__))
          	UI.add_context_menu_handler do |menu|
          		sel = Sketchup.active_model.selection
          		if sel.first.is_a?(Sketchup;;ComponentInstance)
          			menu.add_separator
          			menu.add_item('Colour Nested Components') {
          				sel.first.definition.entities.grep(Sketchup;;ComponentInstance).each{|ci|
          					ci.material=Sketchup.active_model.materials.current
          				}
          			}
          		end
          	end
          	file_loaded((__FILE__))
          end
          
          

          LARV.gif

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

          http://sdmitch.blogspot.com/

          1 Reply Last reply Reply Quote 0
          • L Offline
            LARV
            last edited by

            @tig said:

            Use the Outliner ?
            It's possible to make multiple selections within the same context [+Ctrl]

            Where do I find the outliner tool?

            1 Reply Last reply Reply Quote 0
            • L Offline
              LARV
              last edited by

              @sdmitch said:

              @larv said:

              If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.

              unless file_loaded?((__FILE__))
              > 	UI.add_context_menu_handler do |menu|
              > 		sel = Sketchup.active_model.selection
              > 		if sel.first.is_a?(Sketchup;;ComponentInstance)
              > 			menu.add_separator
              > 			menu.add_item('Colour Nested Components') {
              > 				sel.first.definition.entities.grep(Sketchup;;ComponentInstance).each{|ci|
              > 					ci.material=Sketchup.active_model.materials.current
              > 				}
              > 			}
              > 		end
              > 	end
              > 	file_loaded((__FILE__))
              > end
              > 
              

              Yes, that looks about right, but I don´t understand what you´re getting at? The "Colour Nested Components" doesnt show in my right-click-list. Is it a plugin? I can´t seem to find it in the plugin store

              1 Reply Last reply Reply Quote 0
              • Dave RD Offline
                Dave R
                last edited by

                @larv said:

                @tig said:

                Use the Outliner ?
                It's possible to make multiple selections within the same context [+Ctrl]

                Where do I find the outliner tool?

                Have you looked at the Window menu?

                Etaoin Shrdlu

                %

                (THERE'S NO PLACE LIKE)

                G28 X0.0 Y0.0 Z0.0

                M30

                %

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

                  @larv said:

                  @sdmitch said:

                  @larv said:

                  If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.

                  unless file_loaded?((__FILE__))
                  > > 	UI.add_context_menu_handler do |menu|
                  > > 		sel = Sketchup.active_model.selection
                  > > 		if sel.first.is_a?(Sketchup;;ComponentInstance)
                  > > 			menu.add_separator
                  > > 			menu.add_item('Colour Nested Components') {
                  > > 				sel.first.definition.entities.grep(Sketchup;;ComponentInstance).each{|ci|
                  > > 					ci.material=Sketchup.active_model.materials.current
                  > > 				}
                  > > 			}
                  > > 		end
                  > > 	end
                  > > 	file_loaded((__FILE__))
                  > > end
                  > > 
                  

                  Yes, that looks about right, but I don´t understand what you´re getting at? The "Colour Nested Components" doesnt show in my right-click-list. Is it a plugin? I can´t seem to find it in the plugin store

                  Yes it is a "plugin" and needs to be loaded or copied to the Plugins/Extensions folder


                  Colour Nested Comps.rb

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

                  http://sdmitch.blogspot.com/

                  1 Reply Last reply Reply Quote 0
                  • L Offline
                    LARV
                    last edited by

                    @sdmitch said:

                    @larv said:

                    @sdmitch said:

                    @larv said:

                    If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.

                    unless file_loaded?((__FILE__))
                    > > > 	UI.add_context_menu_handler do |menu|
                    > > > 		sel = Sketchup.active_model.selection
                    > > > 		if sel.first.is_a?(Sketchup;;ComponentInstance)
                    > > > 			menu.add_separator
                    > > > 			menu.add_item('Colour Nested Components') {
                    > > > 				sel.first.definition.entities.grep(Sketchup;;ComponentInstance).each{|ci|
                    > > > 					ci.material=Sketchup.active_model.materials.current
                    > > > 				}
                    > > > 			}
                    > > > 		end
                    > > > 	end
                    > > > 	file_loaded((__FILE__))
                    > > > end
                    > > > 
                    

                    Yes, that looks about right, but I don´t understand what you´re getting at? The "Colour Nested Components" doesnt show in my right-click-list. Is it a plugin? I can´t seem to find it in the plugin store

                    Yes it is a "plugin" and needs to be loaded or copied to the Plugins/Extensions folder

                    Thanks I will try it 👍

                    EDIT: I put the file in the pluginsfolder, restarted sketchup, but its not there when I right-click on a group or component containing other groups or components.

                    1 Reply Last reply Reply Quote 0
                    • L Offline
                      LARV
                      last edited by

                      @tig said:

                      Use the Outliner ?
                      It's possible to make multiple selections within the same context [+Ctrl]

                      OK, thanks I found it. It seems to be an easy way to select different groups within a model, but I didn´t find a way to select everything and change the colour.

                      I think SDMitch plugin tip is just what I need! Going to check that out

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

                        @larv said:

                        If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.

                        It doesn't appear in the context menu because, as written, it only recognizes right clicks on components which what you asked for. Also, it will find only components in the component selected. Do you want it to treat groups and components equally?

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

                        http://sdmitch.blogspot.com/

                        1 Reply Last reply Reply Quote 0
                        • L Offline
                          LARV
                          last edited by

                          @sdmitch said:

                          @larv said:

                          If I have a component made up of several other components, is there a way to select everything within that main component? Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.

                          It doesn't appear in the context menu because, as written, it only recognizes right clicks on components which what you asked for. Also, it will find only components in the component selected. Do you want it to treat groups and components equally?

                          Yes, that would be great. When dowloading models there´s often a mixture of groups and components.
                          Personaly I cant really tell the difference between the two and usually just click on "make component".

                          1 Reply Last reply Reply Quote 0
                          • N Offline
                            numerobis
                            last edited by

                            @larv said:

                            Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.

                            Global Material Changer
                            http://sketchucation.com/forums/viewtopic.php?p=96863#p96863

                            1 Reply Last reply Reply Quote 0
                            • L Offline
                              LARV
                              last edited by

                              @numerobis said:

                              @larv said:

                              Let´s say I would like to change the colour of everything inside this component of components without having to manually go into each individual one and make the change.

                              Global Material Changer
                              http://sketchucation.com/forums/viewtopic.php?p=96863#p96863

                              Oh man... I HAVE that plugin, been using it alot, but I never noticed the "ANY" (=all) selection. So thanks alot! perfect

                              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