entityID doesn't update in a group copy

thankyou (sorry my bad “langguage”, i dont know how to thank)…it work for all group and sub group. should we must run this before working with “group”?

It depends, if you are copiing the group, which you know it will copied, just make unique that specific group before you copy.

If you do not know which group will be copied then you can make “all_groups_unique” before…but you can make this after copiing…it is really depends what do you want to achieve?
Do you really need all groups unique or just that specific you are working on?
You are ther programmer you need to decide! :wink:

“Official” answer by documentation:
The #make_unique method is used to force a group to have a unique definition. If the group is already unique in the model, nothing happens.

Copying a group in SketchUp will create a group that shares the same definition. SketchUp implicitly makes group unique when edited from the GUI, and from a user point of view groups could be thought of as always being unique. To honor this behavior, call this method before editing a group through the API.

“but you can make this after copiing” i like this
but “why SKETCHUP do not make this after copiing”

in my mind “how much run all_groups_unique take computer memory” or “run all_groups_unique can make Sketchup slow for big model”

Because in the entity info SketchUp says how many groups like yours there is in the model.
Captura de pantalla 2023-10-04 a las 17.08.45

1 Like

I guess the groups are designed like this by purpose, is really handled internally similar as a components, to save disk space a group definition can “handle” several instances like a components.

This is perfectly fine as long as the user sees them as intended.

Therefore, the API documentation warns the developers (you) to pay attention to this.
If you make each group unique then, warn the user because:
-you overturn the original behavior
-the file takes up more space than it should
So before doing this, think twice and only change the groups that are absolutely necessary.

At least how I would do.

1 Like

thank you ( i dont know how to thank )…you are the master.

1 Like