Calculating Summed-up Volumes with Ruby

Calculating Summed-up Volumes with Ruby

  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 as well as the areas of the perimeter surfaces (e.g. for estimating formwork). You can use this piece of code and customize it to your liking. For example, you could export the data separately for each object to a text file (or to a multiline messagebox) for use in Excel afterwards....
Read More
What’s New in SketchUp 2014? Better Ruby, for Example!

What’s New in SketchUp 2014? Better Ruby, for Example!

By now you most probably have heard that SketchUp 2014 has been released. There are quite a few great new-feature overviews and reviews out there and I'll suggest you look at the ones linked at the end of this post to get up to speed. For now, I just wanted to show you why the Ruby update in SketchUp 2014 is pretty amazing. Look at this image: What is so interesting about the image above? Well - those are images that were loaded from Flickr directly into SketchUp using the now included "net/http" library. Since SU 2014 not only updated Ruby to 2.0 but also included all of the standard libraries, stuff like this is now possible. You can integrate Net functionality much more and create all kinds of interesting mash-ups. To replicate what I did above, copy the following code snippet and either paste it into the Ruby Console (it now accepts multiline Ruby!) or into my Ruby Code Editor. Code Snippet SketchUp 2014...
Read More
Ruby Code Editor updated to version 3.0

Ruby Code Editor updated to version 3.0

  I finally got around to updating my Ruby Code Editor to version 3.0. There are quite a few upgrades including: better environment stability (editor, scrolling, results, etc.), code completion for SketchUp classes and methods and a variety of other minor updates (including the fact that it now remembers the last file). The following video gives a brief overview of the current version: http://youtu.be/yGWs9p2WZsg As always, you can get this editor from my website (and look at the more detailed changelog or leave comments) at: http://www.alexschreyer.net/projects/sketchup-ruby-code-editor/ For more on what you can do with this tool, check out Chapter 6 in my book "Architectural Design with SketchUp"....
Read More
Christmas / Holiday Card Tutorial Now Available

Christmas / Holiday Card Tutorial Now Available

Happy New Year everyone!!! Now that my Christmas / Holiday Card is "so last year", it is time to reveal how it was made. For a tutorial (that also includes the Ruby script I used for it), go to the SketchUcation.com website. You can find the tutorial there. http://sketchucation.com/resources/tutorials/48-advanced/306-scripting-a-christmas-card-with-ruby...
Read More