How to delete objects situated inside of another object

Hi, I’m new to SketchUp and also to Ruby and I need your help:)
I have an array with this tile objects, and one object in inside of whom I have a part of tile objects. I want to delete this object with all tiles which are in them. How could be done?
I think of some iteration through all tiles, and to delete them if they are situated in coordinates x,y where this object is also situated, may be this is not the best approach. but I don’t know even how to do this.
Thanks in advance for your help !!!

Your explanations are confusing. It’s always best to post a small model file so we can look at it.

Your Ruby array contains references to objects. It does not “have” API objects inside them.

An Entities collection has Drawingelecment entity objects within it. The model itself and component definitions have entities collections. Group and component instances do not have or own entities. It’s their definition’s that own the entities.

So, besides posting the sample SKP file (to the original post) give the container objects names and refer to names instead of vague “this object” “another object” etc.


Is this for roof tiles ? If so we don’t recommend modeling small tiles like this. Instead it is better to use a repeating texture and paint the roof surfaces. Modeling many tiles or shingles just creates a huge model that is very slow to navigate.

1 Like