Calculating Summed-up Volumes with Ruby (Snippet)

Calculating Summed-up Volumes with Ruby (Snippet)

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: Here's the total 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...
Read More
SketchUp 3D Basecamp 2014 Recap

SketchUp 3D Basecamp 2014 Recap

Now that the semester is winding down, I can finally look back and post about the great SketchUp 3D Basecamp conference that happened 4/14-4/16 this year in Vail, Colorado. As in years past, this was a meeting of SketchUp users, plugin authors, technology vendors, and, of course, all the makers of SketchUp. What was especially good this year was that the conference was held in the same place where everyone stayed, making things very convenient. Once we all arrived there - which was not all that easy due to a late-season snowstorm - we got to enjoy the beauty of Vail and the hospitality of the Vail Cascade hotel. As part of days one and two I gave a presentation on "Components are our friends: How component-based modeling can improve your life" and a workshop (together with Daniel Tal) on "Plugins and Scripting for Architects". There were actually too many great presentations for anyone to attend, so the best way to catch up is actually to watch them...
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: We can now use web requests in our Ruby code! 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...
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: https://www.youtube.com/watch?v=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

The raw, unrendered version 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