# When component instances equals component definitions

**URL:** <https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986>\
**Category:** Pro\
**Created:** [February 22, 2019, 1:04am UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986 "2019-02-22T01:04:16Z")\
**Posts on this page:** 15\
**Page:** 1

<div class="post-metadata">

**Author:** ![colin](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/colin/32/266703_2.png) [@colin](https://forums.sketchup.com/u/colin)\
**Post date:** [February 22, 2019, 1:04am UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/1 "2019-02-22T01:04:16Z")

</div>

I’m looking at a model for someone, that is extremely demanding even though it’s only 60 MB. There are over 500,000 faces, but the thing that seems most odd to me is that there are over 10,000 component definitions. And, the number of component instances is exactly the same number. Model Info, Statistics, Purge Unused, doesn’t change those numbers.

I tried CleanUp and a Purge extension, they didn’t have very much to fix. When the model first opened it had some things that SketchUp wanted to fix, and when I asked for the Details, the text of the details was so much that it locked up SketchUp. Also, showing the components panel (I’m on Mac by the way) locks up SketchUp, and never appears.

Just opening the model in SketchUp 2018 can take about 40 minutes.

I can’t upload the model, it’s not mine to share, but on the general question of that many components, and every one of them being unique, is there any extension that could replace all identical unique components with just one of them? Or any other thoughts about how you could easily get to have over 10,000 unique components.

---

<div class="post-metadata">

**Author:** ![Box](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/box/32/235164_2.png) [@Box](https://forums.sketchup.com/u/Box)\
**Post date:** [February 22, 2019, 1:14am UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/2 "2019-02-22T01:14:26Z")

</div>

Select all components, right click on one in the component browser and select replace selected. No plugin needed.  
Mind you it will take forever to open the component browser with 10,000 components.

---

<div class="post-metadata">

**Author:** ![colin](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/colin/32/266703_2.png) [@colin](https://forums.sketchup.com/u/colin)\
**Post date:** [February 22, 2019, 1:40am UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/3 "2019-02-22T01:40:11Z")

</div>

That sounds like it would work for 10,000 components of the one single component, but suppose there are 100 unique components and 100 instances of each. And I don’t know what the components look like (because I can’t open the components browser). What then?

ps, I should give the components browser the same 40 minutes to succeed that I gave the model in opening it.

---

<div class="post-metadata">

**Author:** ![Box](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/box/32/235164_2.png) [@Box](https://forums.sketchup.com/u/Box)\
**Post date:** [February 22, 2019, 1:44am UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/4 "2019-02-22T01:44:37Z")

</div>

> [@colin](#):
>
> 100 unique components and 100 instances of each.

Use Thomthom’s Groups 2 Components to select only the specific instances and replace them with one, repeat 99 times.

---

<div class="post-metadata">

**Author:** ![Cotty](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/cotty/32/251290_2.png) [@Cotty](https://forums.sketchup.com/u/Cotty)\
**Post date:** [February 22, 2019, 5:54am UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/5 "2019-02-22T05:54:08Z")

</div>

Such a tool is a part of his SelectionToys too.

---

<div class="post-metadata">

**Author:** ![Box](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/box/32/235164_2.png) [@Box](https://forums.sketchup.com/u/Box)\
**Post date:** [February 22, 2019, 5:55am UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/6 "2019-02-22T05:55:19Z")

</div>

Cheers @Cotty I always get that confused.

---

<div class="post-metadata">

**Author:** ![slbaumgartner](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/slbaumgartner/32/7302_2.png) [@slbaumgartner](https://forums.sketchup.com/u/slbaumgartner)\
**Post date:** [February 22, 2019, 2:43pm UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/7 "2019-02-22T14:43:01Z")

</div>

@colin, since you say that (after a sizable delay) you can open the model, perhaps you could provide some additional insight as to the nature of the model without resorting to the component browser or outliner, both of which are going to be incredibly sluggish.

When you view the model do you _see_ large numbers of repeats of what appear to be the same objects? Is _everything_ a component instance, or are there also loose edges and faces in the model? For example a large building might have a lot of identical windows or a performance venue might have thousands of identical chairs. If you select a couple of seemingly identical objects, does Entity Info show anything different about them other than their Component definition, such as layer, instance name or advanced attributes? Without resorting to some Ruby, one can’t see whether the model has other kinds of attribute dictionaries attached to objects, but that would also be valuable to know.

I ask because the only way I can imagine such a model coming to be (without someone dying of fatigue and boredom) is if it was created by some automated mechanism that either has no concept equivalent to SketchUp’s components or that for some reason thinks each object has one or more unique non-geometric properties. The answers are relevant to “fixing” the model in SketchUp because you may risk losing distinctions that were originally important if, for example, you bulk replace a mass of unique components with multiple instances of a single component.

Also, the suggestions above all glibly rely on the assumption that you can somehow select the existing instances you think are equivalent. Unless all the equivalent instances use the same distinct layer, I don’t think ThomThom’s tools provide a way to accomplish that. That is, they don’t have any “select all instances of component definitions whose internal edge and face geometry is identical”. Unless the similar objects are spatially organized separately from all others, it will be terribly tedious to try to select them one-by-one.

I can conceive an algorithm that would identify geometric duplicates and unify them as instances of the same component (though numeric precision effects might be an issue depending on how the locations of vertices were originally generated). Implemented in Ruby there is the risk that it would take a very long time, though!

---

<div class="post-metadata">

**Author:** ![Anssi](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/anssi/32/105_2.png) [@Anssi](https://forums.sketchup.com/u/Anssi)\
**Post date:** [February 22, 2019, 6:49pm UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/8 "2019-02-22T18:49:28Z")

</div>

> [@colin](#):
>
> there are over 10,000 component definitions. And, the number of component instances is exactly the same number

Sounds like an export from Revit.

---

<div class="post-metadata">

**Author:** ![colin](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/colin/32/266703_2.png) [@colin](https://forums.sketchup.com/u/colin)\
**Post date:** [February 22, 2019, 6:54pm UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/9 "2019-02-22T18:54:46Z")

</div>

Quite possible. It’s a large warehouse, or something like that, with no walls but lots of beams.

---

<div class="post-metadata">

**Author:** ![john\_drivenupthewall](https://avatars.discourse-cdn.com/v4/letter/j/c67d28/32.png) [@john\_drivenupthewall](https://forums.sketchup.com/u/john_drivenupthewall)\
**Post date:** [February 22, 2019, 8:01pm UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/10 "2019-02-22T20:01:41Z")

</div>

are all the origins set at a global 0,0,0?

ifc, and some other formats uses that as the basis for component geometry positions…

it uses the naming conventions to tell it there are multiple, identical components…

it is a pita to manually change all the axes and find common items…

even with a ruby script it take a long time…

john

---

<div class="post-metadata">

**Author:** ![colin](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/colin/32/266703_2.png) [@colin](https://forums.sketchup.com/u/colin)\
**Post date:** [February 22, 2019, 8:54pm UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/11 "2019-02-22T20:54:47Z")

</div>

Some information that may help, here is a typical definition in Entity Info:

5c3c9503-0002-7f85-3135-343734383435

Also, going into any component shows that its bounding area goes from where the geometry is, to the other side of the global origin. All components have an origin that is at the same location as the global origin. Exploding and making a new component makes it more normal.

---

<div class="post-metadata">

**Author:** ![MikeWayzovski](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/mikewayzovski/32/98346_2.png) [@MikeWayzovski](https://forums.sketchup.com/u/MikeWayzovski)\
**Post date:** [February 22, 2019, 9:18pm UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/12 "2019-02-22T21:18:25Z")

</div>

Check this thread:

> [@"make component" takes very long, does not complete - too long to be productive](https://forums.sketchup.com/t/make-component-takes-very-long-does-not-complete-too-long-to-be-productive/88020/46):
>
> An extension will only get to work when the model is loaded, an importer might tackle the problems before? simple example: an ifc file with the size of 2.3 KB will result in a 37MB SketchUp file.[KozijnenOnly.zip](https://forums.sketchup.com/uploads/short-url/zR4fMaUcm5dmnQOdvRsbpdK7yXw.zip) (388.2 KB) and it is just a few frames… 
> 
> > **Notes**
> >
> > extracted this ifc from a 280 MB file wich would result in a 4.5 GB SketchUp File, theoretically. \<a href="http://www.datacubist.com/benefits/"\>SimpleBIM\</a\> handled that file dead easily… 1 1/2 minutes[bim…

---

<div class="post-metadata">

**Author:** ![Box](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/box/32/235164_2.png) [@Box](https://forums.sketchup.com/u/Box)\
**Post date:** [February 22, 2019, 10:33pm UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/13 "2019-02-22T22:33:08Z")

</div>

> [@slbaumgartner](#):
>
> glibly rely on the assumption that you can somehow select the existing instances you think are equivalent

**Glibly** really? Colin said ‘100 unique components and 100 instances of each’, Thomthom’s tools will select all 100 of those instances no matter what layer they are on, no glib needed.🙂

---

<div class="post-metadata">

**Author:** ![slbaumgartner](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/slbaumgartner/32/7302_2.png) [@slbaumgartner](https://forums.sketchup.com/u/slbaumgartner)\
**Post date:** [February 22, 2019, 11:11pm UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/14 "2019-02-22T23:11:29Z")

</div>

Well, first of all his original statement was that there were 10000 instances each of its own unique component, with no information about how many are geometrically identical. I admit I’m not an expert, but I don’t see something in TT’s tool that is helpful for that case. And even if it was 100 instances each of 100 different components, doing them one at a time would be pretty tedious!

---

<div class="post-metadata">

**Author:** ![Box](https://sea2.discourse-cdn.com/sketchup/user_avatar/forums.sketchup.com/box/32/235164_2.png) [@Box](https://forums.sketchup.com/u/Box)\
**Post date:** [February 22, 2019, 11:20pm UTC](https://forums.sketchup.com/t/when-component-instances-equals-component-definitions/88986/15 "2019-02-22T23:20:08Z")

</div>

If you are able to select all 10,000 components, which can be done in several ways, you can exchange all of them for one. Not quite enough info in the OP to determine if they are 10,000 unique but identical or a mixture. I gave an answer for 10,000 unique identical.  
Yes 100 by 100 would be tedious which is why I said, repeat 99 times.
