• Login
sketchucation logo sketchucation
  • Login
ℹ️ GoFundMe | Our friend Gus Robatto needs some help in a challenging time Learn More

How to do copy all nested components

Scheduled Pinned Locked Moved SketchUp Discussions
sketchup
13 Posts 4 Posters 2.6k 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.
  • X Offline
    xtov
    last edited by 2 Apr 2021, 10:18

    I have a Component#1 containing a nested Component#2.
    I would like to select all Component#2 and copy them outside.
    How can you do that ?
    The only way i figured is to copy all Component#1 in place, open them and delete all geometry except Component#2... weird because this only a test case. In real project my components are nested very deeper...

    [attachment=0:2mtafjcm]<!-- ia0 -->Clipboard01.jpg<!-- ia0 -->[/attachment:2mtafjcm]

    regards,
    xtov

    1 Reply Last reply Reply Quote 0
    • T Offline
      TIG Moderator
      last edited by 2 Apr 2021, 12:11

      Edit Component#1
      Select all of the instances of Component#2***
      Edit>Copy
      Exit the edit-model back into the model [or go into another edit-context if desired]
      Edit>Past-in-Place
      The instances are replicated outside of Component#1

      If you prefer Edit>Paste will initially attached the copied-selection onto you cursor to manually snap it where you want...

      ***Selecting the instances of Component#2 can be done in several ways...
      Manually picking each one is unlikely to be the best...
      One simple way is while you are editing Component#1 open the Component Browser's model-tab and hover over the entry for Component#2, right-click context-menu > Select all instances. All instances in the current context are now highlighted - if there are other instances in other contexts they will not be selected...

      To move the instances into another context use Edit>Cut, instead... pasting into the other context...

      TIG

      1 Reply Last reply Reply Quote 0
      • C Offline
        cotty
        last edited by 2 Apr 2021, 12:18

        This is kind of the other way around... you can paste a component to other components OUTSIDE the component...

        https://sketchucation.com/forums/viewtopic.php?f=323&t=53304

        my SketchUp gallery

        1 Reply Last reply Reply Quote 0
        • X Offline
          xtov
          last edited by 2 Apr 2021, 13:31

          Thank you Tig and Cotty for your fast answers.

          Tig, the problem is exactly that I can not select all instances. If B is nested in A, when I open A and select B, it highlights all B components but only one is really selected. Same in the outliner, all B components are higlighted but only one is selected and I can not CTRL+click another one to add to the selection

          Cotty, i will investigate Curic plugin but i think is doing the opposite as my request (it adds a component in a component).

          regards,
          xtov

          1 Reply Last reply Reply Quote 0
          • T Offline
            TIG Moderator
            last edited by 2 Apr 2021, 13:48

            Select all of the nested component#1 instances - by fence, or using the Component Browser trick...
            Move + Ctrl and copy then all a set distance away.
            While they are still highlighted right-click > context-menu > Make Unique - they are now not linked to component#1 - named component#NNN [incremented to suit]
            Now edit one of its instances and delete everything but component#2.
            All instances of component#NNN will now contain just component#2
            Next select all of the instances of component#NNN using the Component Browser trick...
            Right-click > context-menu > Explode - the instances of component#2 are now relocated into the expected context.
            They are highlighted so you can move them etc as desired...

            If you want to actually 'move' component#2 outside of component#1 then move it's still selected instances back in place, snapping over component#1, next edit an instance of component#1 and delete component#2 within it - it should all vanish from that context...

            To tidy up Purge unused components - or simply delete component#NNN in the Component Browser as it's no longer used...

            TIG

            1 Reply Last reply Reply Quote 0
            • X Offline
              xtov
              last edited by 2 Apr 2021, 14:11

              Yes, it works! Great. But it is quite complicated.
              And with deeper nested components you will need to explode root component multiples times...
              I guess there is no easy solution, even with code.

              Thank you very much anyway.

              Regards,
              Xtov

              @tig said:

              Select all of the nested component#1 instances - by fence, or using the Component Browser trick...
              Move + Ctrl and copy then all a set distance away.
              While they are still highlighted right-click > context-menu > Make Unique - they are now not linked to component#1 - named component#NNN [incremented to suit]
              Now edit one of its instances and delete everything but component#2.
              All instances of component#NNN will now contain just component#2
              Next select all of the instances of component#NNN using the Component Browser trick...
              Right-click > context-menu > Explode - the instances of component#2 are now relocated into the expected context.
              They are highlighted so you can move them etc as desired...

              If you want to actually 'move' component#2 outside of component#1 then move it's still selected instances back in place, snapping over component#1, next edit an instance of component#1 and delete component#2 within it - it should all vanish from that context...

              To tidy up Purge unused components - or simply delete component#NNN in the Component Browser as it's no longer used...

              1 Reply Last reply Reply Quote 0
              • R Offline
                rv1974
                last edited by 2 Apr 2021, 14:31

                I have an old free and super useful plugin made by Jim (based on my private request, he never published it I guess it wasn't too important for him). It does what you need with 2 clicks BUT I'm not sure I can share publicly.

                1 Reply Last reply Reply Quote 0
                • X Offline
                  xtov
                  last edited by 2 Apr 2021, 14:44

                  Thank you rv1974
                  If you are able to ask him if it can be published (even as is, as a snippet code) this would be great. It could help me and all the community

                  regards,
                  Xtov

                  @rv1974 said:

                  I have an old free and super useful plugin made by Jim (based on my private request, he never published it I guess it wasn't too important for him). It does what you need with 2 clicks BUT I'm not sure I can share publicly.

                  1 Reply Last reply Reply Quote 0
                  • R Offline
                    rv1974
                    last edited by 2 Apr 2021, 16:07

                    He left SU plugins scene and deleted all his plugins from web. This clearly demonstrate s his attitude. But if you'd get his OK I'd gladly post it here

                    1 Reply Last reply Reply Quote 0
                    • X Offline
                      xtov
                      last edited by 2 Apr 2021, 17:18

                      Yes, i searched and can see that he has left and removed all his plugins. Maybe he has other plans or turned the page... I will not bother him with that.
                      Thank you for your time.
                      I will try to code it myself (good training) or maybe other SU guru's will take a look at it.

                      regards,
                      xtove

                      @rv1974 said:

                      He left SU plugins scene and deleted all his plugins from web. This clearly demonstrate s his attitude. But if you'd get his OK I'd gladly post it here

                      1 Reply Last reply Reply Quote 0
                      • R Offline
                        rv1974
                        last edited by 2 Apr 2021, 17:44

                        basically the first part of his plugin saves the selected component in the separate skp file right next to the file you are currently in. PLUS it creates text file with coordinates of all its instances. In the second stage you just select this newly created skp file and the script would put (context free!) the component instances based on coordinates listed in txt file. If you could unify 2 stages in a singe operation it'd improve things even further.

                        1 Reply Last reply Reply Quote 0
                        • X Offline
                          xtov
                          last edited by 3 Apr 2021, 08:21

                          Ah, interesting! I would rather have tried TIG's workflow but i can see tricky traps: exploding components anywhere could merge lonely geometry (yes, that's bad but it happens), cleaning all unique components afterwards can be akward too...
                          But creating a side SKP file can also be weird...( especially when working on networked shares or Onedrive directories... Windows related problems almost impossible to solve)...

                          Xtov

                          @rv1974 said:

                          basically the first part of his plugin saves the selected component in the separate skp file right next to the file you are currently in. PLUS it creates text file with coordinates of all its instances. In the second stage you just select this newly created skp file and the script would put (context free!) the component instances based on coordinates listed in txt file. If you could unify 2 stages in a singe operation it'd improve things even further.

                          1 Reply Last reply Reply Quote 0
                          • R Offline
                            rv1974
                            last edited by 3 Apr 2021, 13:48

                            Maybe my description is too complicated, but It's rather simple idea under the hood, hence it never failed. I use it on constantly.
                            PS Check PM

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

                            Advertisement