Select objects of certain size, does this exist?

I’m working with some IFC file I’ve been provided and I’ve managed to reduce their size by going through Trimble connect and saving out as TrimBim which has been a god send. However some of the file have more detail than others. I don’t need the super detail that they have and although I’ve been able to isolate a lot of things on Tags, there are some which are all in the same instance/tag. So I was wondering is there a selection tool that allows you to only grab object over a minimum size. For instance nothing smaller than 500mmx500mm. Can’t find anything, but I’m sure someone know a neat trick or a plugin that I’ve missed.
Thanks

In Sketchup objects are 3D… so better to give the 3rd too :wink:

:thinking: However, the diagonal of the entities bounding box can be also a good representation of the size. So I made a quick code snippet which can remove the entities from the selection, which diagonals are smaler than a parameter (default is 500.mm).

def selmin( mindiagonal = 500.mm)
  model = Sketchup.active_model
  sel = model.selection
  sel.to_a.each{|e| 
    next unless e.respond_to?(:bounds)
    if e.bounds.diagonal < mindiagonal
      sel.remove( e )
    end
  }
end

Usage:
Open Ruby Consele and copy paste the snippet into it.
Select the objects in a question
Type into Ruby console:
selmin (For default 500.mm)
or e.g.:
selmin 700.mm
or e.g.:
selmin 25 (Where 25 the diagonal in inches)

and hit Enter (Return)
selmin

2 Likes

Heya, sorry got distracted last week with a deadline, thanks for this little code, I will give it a go