
Calculating Summed-up Volumes with Ruby (Snippet)
This collection of small script snippets presents handy little routines that are usually too small to put into a proper extension. Use them with the Ruby Code Editor (just paste the code and hit "run") or make them more permanent as a menu item (see Appendix D in my book).
I received an email a few days ago by someone who needed to calculate volumes and face areas in SketchUp for the purpose of estimating. I suggested doing this in a few lines with Ruby and as it turns out, it is pretty easy as long as the objects that need to be summed up are "solid" groups in SketchUp. I thought the solution could be useful for others, too, so here it is:
Just paste the code below into the Ruby Code Editor in SketchUp. Then select the groups that you would like to sum up and press the Run button. With this version, you will get the sum of the volumes...