Sketchup Select By Area Sizes  Topic is solved

Got an idea to improve SketchUp?

Sketchup Select By Area Sizes

Postby Ozansahin » Tue Jan 14, 2020 4:37 pm

I have lots of faces but I want to select for example larger than 10 sqm.
Is there a way to select? like selection filter.

Thank you.
0

Ozansahin 
 

Re: Sketchup Select By Area Sizes  Topic is solved

Postby Sminky » Wed Jan 15, 2020 7:12 am

Hi,
I sometimes need to do the same thing and so I wrote a simple ruby script to do it.
To use it, first select all the faces. Then open ruby console and copy/paste this code:

Code: Select all
model=Sketchup.active_model
entities = Sketchup.active_model.entities
sel=model.selection.grep(Sketchup::Face)
input=UI.inputbox(["Area:"],[100],"Input the lower limit of the area in Sketchup units")
aftersel=[]
sel.each{|x|
   if Sketchup.format_area(x.area).to_f>input[0]
      aftersel<<x
   end   
}
model.selection.clear
model.selection.add(aftersel)


In the input dialog use area measures in the units your sketchup is set to. (My sketchup is set to meters so this will select faces with area of more than 100 square meters).

Best regards
0
User avatar
Sminky 
 

Re: Sketchup Select By Area Sizes

Postby Ozansahin » Wed Jan 15, 2020 8:37 am

This is amazing. Thank you.
0

Ozansahin 
 

SketchUcation One-Liner Adverts

by Ad Machine » 5 minutes ago



Ad Machine 
Robot
 



 

Return to SketchUp Feature Requests

Who is online

Users browsing this forum: No registered users and 1 guest

Visit our sponsors: