sketchucation logo sketchucation
    • Login
    โ„น๏ธ Licensed Extensions | FredoBatch, ElevationProfile, FredoSketch, LayOps, MatSim and Pic2Shape will require license from Sept 1st More Info

    [REQ] Convert ALL components to groups?

    Scheduled Pinned Locked Moved Plugins
    26 Posts 10 Posters 5.4k Views 10 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.
    • plot-parisP Offline
      plot-paris
      last edited by

      the new feature of renaming new groups after the original component's name is quite nice.

      however, I can't transform a selection of components to groups anymore. now I have to right cklick the instances one by one, telling them to become a group, which costs a lot of time.

      is there a way to change it back to how it was (ability to transform several components to groups in one operation)?

      cheers,

      Jakob

      1 Reply Last reply Reply Quote 0
      • M Offline
        Matt666
        last edited by

        Hi plot-paris !

        @unknownuser said:

        however, I can't transform a selection of components to groups anymore. now I have to right cklick the instances one by one, telling them to become a group, which costs a lot of time.

        โ“ Strange... It works without problem here...
        Can you open ruby console before running the tool and show the matter returned inside the console here, please ?

        If you want to convert all components, don't select anything, it will convert all components in the drawing.

        Frenglish at its best !
        My scripts

        1 Reply Last reply Reply Quote 0
        • plot-parisP Offline
          plot-paris
          last edited by

          here is what is displayed in the ruby console, when I apply the tool to a selection of components (if I don't select anything, it still transfers only the component, that has been right clicked):

          Error; #<NoMethodError; undefined method `c2g_boucle' for #<Object;0x485a290 @model=#<Sketchup;;Model;0x56f7678>, @nb=1>>
          C;/Program Files/Google/Google SketchUp 6/Plugins/C2G.rb;42;in `boucle'
          C;/Program Files/Google/Google SketchUp 6/Plugins/C2G.rb;29;in `each'
          C;/Program Files/Google/Google SketchUp 6/Plugins/C2G.rb;29;in `boucle'
          C;/Program Files/Google/Google SketchUp 6/Plugins/C2G.rb;20;in `c2g'
          C;/Program Files/Google/Google SketchUp 6/Plugins/C2G.rb;69
          C;/Program Files/Google/Google SketchUp 6/Plugins/C2G.rb;69;in `call'
          
          
          1 Reply Last reply Reply Quote 0
          • M Offline
            Matt666
            last edited by

            @unknownuser said:

            a "transform to group" command

            New version can transform all components in the right click selection.

            @unknownuser said:

            I get an error message on opening SU after copying in your .rb

            !!! I have no problem here !!! Could someone test this script ???
            Mac or PC ?

            @unknownuser said:

            I ran the other .rb I received- it definitely works,

            Can you show us this script, please ?

            @unknownuser said:

            but I had to delete and purge 90% of the model

            New version asks if you want to purge.

            EDIT : New version with TIG advices ! ๐Ÿ˜‰
            EDIT : New version with bugs fixes ! Thank you Plot Paris !


            C2G.rb

            Frenglish at its best !
            My scripts

            1 Reply Last reply Reply Quote 0
            • M Offline
              Matt666
              last edited by

              ๐Ÿ˜ณ ๐Ÿ˜ณ ๐Ÿ˜ณ ๐Ÿ˜ณ
              Excuse me....

              A new version has been updated in the script's post.

              Frenglish at its best !
              My scripts

              1 Reply Last reply Reply Quote 0
              • plot-parisP Offline
                plot-paris
                last edited by

                and it works... wonderful! ๐Ÿ˜

                thanks a lot, Matt666

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

                  What about G2C? ๐Ÿ˜› Is this still not possible at this time?

                  1 Reply Last reply Reply Quote 0
                  • plot-parisP Offline
                    plot-paris
                    last edited by

                    well, that would be wonderful.

                    but I assume (having not a clue of ruby scripting), that it is very difficult to compare geometry. because that is what you had to do, if transforming several identical groups to components.
                    it gets even more complicated, if the instances (of the groups) are rotated or even scaled...

                    but it would indeed be one of the most useful rubies.

                    1 Reply Last reply Reply Quote 0
                    • M Offline
                      Matt666
                      last edited by

                      @unknownuser said:

                      that it is very difficult to compare geometry.

                      Exactly, Plot-Paris... ๐Ÿ˜ž ๐Ÿ˜ฎ

                      Frenglish at its best !
                      My scripts

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

                        @jackson said:

                        Matt,

                        I get an error message on opening SU after copying in your .rb
                        [attachment=0:3hbnrx9w]<!-- ia0 -->C2G Ruby Error.jpg<!-- ia0 -->[/attachment:3hbnrx9w]

                        I ran the other .rb I received- it definitely works, exploding all top level comps and regrouping them, but I had to delete and purge 90% of the model as I think it would take about an hour of SU hanging before that model was fully converted. Would been a perfect task to have left running at lunchtime though!

                        Thanks again,

                        I get the exact same error. any solution?

                        1 Reply Last reply Reply Quote 0
                        • M Offline
                          Matt666
                          last edited by

                          Hi rfn,
                          You just have to add this line at the beginning of the script :

                          require 'sketchup.rb'
                          

                          ๐Ÿ˜‰
                          I will update the script... thank you !

                          Frenglish at its best !
                          My scripts

                          1 Reply Last reply Reply Quote 0
                          • M Offline
                            Matt666
                            last edited by

                            Hello.

                            here is a test which converts components to groups.
                            Not really tested... ๐Ÿ˜‰

                            EDIT : See last version below

                            Frenglish at its best !
                            My scripts

                            1 Reply Last reply Reply Quote 0
                            • A Offline
                              Antiever
                              last edited by

                              With SU 2017 if I select a few components script convert only one random from selection...
                              How can I modify it to convert every selected components to groups?

                              1 Reply Last reply Reply Quote 0
                              • P Offline
                                paguthrie
                                last edited by

                                10 Years later... this script almost does exactly what I need, but as Antiever pointed out it just does one from a selection. Anyone know how to fix this behaviour?

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

                                  @paguthrie said:

                                  10 Years later... this script almost does exactly what I need, but as Antiever pointed out it just does one from a selection. Anyone know how to fix this behaviour?

                                  Hopefully Matt666 wont mind me editing his plugin. Tested in SU2017 in model with and without selections.


                                  C2G.rb

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

                                  http://sdmitch.blogspot.com/

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

                                  Advertisement