Looking for a SketchUp Plugin Developer: Automatic Component Naming in Groups

Hello community!

I’m looking for a plugin developer to help me solve a problem I have with SketchUp. I use SketchUp along with a plugin called Open Cut List to create kitchen cabinets and wardrobes.

What I’m looking for is the ability to automatically update the names of components when I name a group. For example, I have 4 components named “Floor,” “Side 1,” “Side 2,” and “Door.” I group these components together and create a group called “Cabinet 1.” What I want to happen is that when I create the “Cabinet 1” group, the components within it automatically change their names to “Floor - Cabinet 1,” “Side 1 - Cabinet 1,” “Side 2 - Cabinet 1,” and “Door - Cabinet 1.”

I need this functionality to avoid having to rename the components individually since I require the piece list in Open Cut List to have the nomenclature of the corresponding cabinet.

If you know someone who designs extensions, I would appreciate it if you could provide me with their contact information. And if you know of any existing extension that already does this, please let me know the name!

Thank you very much for your help!

Here’s a link to another thread that may be close to what you are looking for:

Batch rename Group Instance - SketchUp - SketchUp Community

Do you ever copy your cabinet groups so there is more than 1 instance ?

I ask because the name you are giving in the GUI is the group instance name.
But instances do not have child entities. Component Definitions do.
And groups are just a special kind of component instance that also has a component definition.

So the child parts belong to the definition. If you were to copy the group and then rename the copy as “Cabinet 2” (or whatever) the extension would rename the child component instances for both groups because they share the same definition and so the same entities collection.

The workaround is to make the group or instance unique after copying it.

  • If you used groups, you’d need to enter the group edit and back out again, just to make it unique (unless you get menu item in your extension to add a make unique command to the context menu.)

  • If you use components instead, there is a native “Make unique” command on the context menu.

I was able to whack out a test module that seems to do what you asked.

But it is a bit fragile. There is no way to unsuffix the children of groups if you later explode them.
(Ie, the API does not have observers that fire before a group is exploded, only after by which time the group object is invalid.)

EDIT: Actually if the child objects are selected and regrouped again, then the group renamed the suffixes will be set correctly. It’s just that whilst they are “loose” they’d have a suffix for a non-existent group.

I also suppose I could add a suffix clearer command that would remove the suffixes for selected objects.