I thought I understood groups and components!
-
Here's what I don't understand...
- Draw a rectangle and push it to make a cube. Make the cube a group.
- Select one of the faces in the group and, in the ruby window, type "yo = Sketchup.active_model.selection[0]"
- Now, copy the cube group so you now have two cubes as two different groups.
- 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!
-
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.
-
It's one of those glitches thet we just work around for now... Make it unique... When it's fixed it won't matter...
Advertisement