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

    Duplicate of component definition

    Scheduled Pinned Locked Moved Developers' Forum
    9 Posts 3 Posters 389 Views 3 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.
    • P Offline
      Pout
      last edited by

      Is there a good and easy way to make a copy of a component definition.
      I can not use make_unique since the component only has one instance.

      I could copy all the entities of the component into a new group and make that a component but then i have duplicate data in the model

      Thx!

      1 Reply Last reply Reply Quote 0
      • thomthomT Offline
        thomthom
        last edited by

        Add a new instance and make that unique?

        Thomas Thomassen β€” SketchUp Monkey & Coding addict
        List of my plugins and link to the CookieWare fund

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

          Like this?

          x=Sketchup.active_model.entities.add_instance(definitionname)
          x.make_unique
          x.definition.name="blabla"

          Then how do i delete the instance again so that i only have the new definition in the library?

          Thx Thomthom for the quick help

          1 Reply Last reply Reply Quote 0
          • thomthomT Offline
            thomthom
            last edited by

            @pout said:

            Then how do i delete the instance again so that i only have the new definition in the library?

            x.erase!

            Thomas Thomassen β€” SketchUp Monkey & Coding addict
            List of my plugins and link to the CookieWare fund

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

              😳

              but thx , solution works perfectly, i was looking into this for half a day now and trying all kinds of things and the most simple one I didn't see

              1 Reply Last reply Reply Quote 0
              • thomthomT Offline
                thomthom
                last edited by

                So what are you cooking?

                Thomas Thomassen β€” SketchUp Monkey & Coding addict
                List of my plugins and link to the CookieWare fund

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

                  Checking some small bugs in our plugin.
                  The smaller they are, the harder they are!

                  1 Reply Last reply Reply Quote 0
                  • Chris FullmerC Offline
                    Chris Fullmer
                    last edited by

                    What plugin go you develop Pout? I was just talking about this the other day - there are quite a few developers here that I have no idea what they are working on. I'm pretty sure I rememeber seeing somewhere what plugin is yours (one of the renderer plugins maybe?), but I do not rememeber what it is. Just curious,

                    Chris

                    Lately you've been tan, suspicious for the winter.
                    All my Plugins I've written

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

                      Hey Chris,

                      We are the developers of the 4D Virtual Builder for Sketchup plugin πŸ˜„
                      Hope you already had the time to test-drive it.

                      Since I'm not a native Ruby developer this forum has been a great help!

                      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