Delete component duplicates

Dear experts,

I have a drawing which has many of the same components. I would like to reduce to 1 item of each component, means delete all dublicates.

In Outliner I can do it manually but I am sure there is a better way to do this automated and quicker.

Thanks a million for your feedback.

KR,
KAI

PS: I use sketchup 2020 pro and 2024 pro

How would you decide which component you want to keep?

1 Like

In Outliner you can multiple select (click on first, shift + click on last) and delete all the components in one go.

But I feel you are aiming for something different than simply deleting them?

2 Likes

Hello Zabobon,

I know that this is posssible and I cleaned already component duplicates like this. I have thousands of components with duplicates and I am looking more for a automated solution, maybe a script or extension.

KR

decide on the definition name. Example keep the blue marked component and delete all others.
KR

2024-09-02 12_55_04-Window

You haven’t explained your need properly…
Do you want to delete versions of a component with a similar name ?
How do you decide which one to keep ?
e.g. comp, comp#1, comp#2 etc becomes the original comp, with gaps where the others were…

OR

Do you want to replace versions of a component with a similar name ?
e.g. comp, comp#1, comp#2 etc becomes comp the others replaced with the original comp…

Do you want to check their names and also for the ‘nearness’ of their definition-geometry or simply rely on their names alone - e.g. comp might be a chair and comp#1 might be a tree !

2 Likes

Selection Toys Plugin. Right click on component and you can select all instances.

Lots of other useful selection features as well.

2 Likes

In the example you give you will erase a lot of the instances of the component and keep one.
Can you explain how you don’t need the majority, but want to keep one ?
How did you get in this mess ?

3 Likes

Looking at the screenshot you posted, it appears that you have a lot of instances of a single component but none of them have been given instance names. If you don’t care which one remains, pick any and delete the rest. But otherwise there is not enough information to determine which you want to keep. And this also begs the question of how/why you created so many instances in the first place if you don’t want them.

2 Likes

Hello TIG,
I only want to keep 1 item of each component in the drawing to create a basis catalog of all components used in the drawing to safe this drawing as a template.

Exactly, I don’t care which component remains unless one item of each used component remains. Doing this by hand is now problem in Outliner, but super time consuming with many of the the same components.

Selection Toys, as I noted above. Select all, they will all turn blue, deselect one, delete. Once you get through all of the model copy paste each one that is left to a new template file…

Or, with the Outliner… Select one - ‘Save as…’ - start a folder of common parts. Once you work through the model you will have a folder to use as a catalog.

1 Like

This might be a practical workaround. It`s all a question of effectiveness when you have a lot components.

I will try this approach.

to move items from the components (in model) tray doesn`t work because there are so many small components as part of a different component. Not practical.