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

    I thought I understood groups and components!

    Scheduled Pinned Locked Moved Developers' Forum
    3 Posts 2 Posters 182 Views 2 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.
    • F Offline
      fizgig
      last edited by

      Here's what I don't understand...

      1. Draw a rectangle and push it to make a cube. Make the cube a group.
      2. Select one of the faces in the group and, in the ruby window, type "yo = Sketchup.active_model.selection[0]"
      3. Now, copy the cube group so you now have two cubes as two different groups.
      4. In the ruby window, type "yo.hidden = true"

      BOTH FACES DISAPPEAR! Both cubes are affected!

      I would have thought only the first face should disappear if they are both groups. They both should disappear if they are two instances of the same component definition. Me very confused!

      1 Reply Last reply Reply Quote 0
      • F Offline
        fizgig
        last edited by

        Woops, just found this in the API docs regarding the group.make_unique method:

        @unknownuser said:

        The make_unique method is a deprecated method used to force a group to have a unique definition.

        Copying a group using the copy tool in SketchUp will create copies of the group that share a common definition until an instance is edited manually or this method is used. If multiple copies are made, all copies share a definition until all copies are edited manually, or all copies have this method used on them. This method ensures that the group uses a unique definition entry in the drawing database.

        What worries me is that this is deprecated. I need this method to always be around for my program to work.

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

          It's one of those glitches thet we just work around for now... Make it unique... When it's fixed it won't matter...

          TIG

          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