3 minute read

Chapter 8 Ruby Scripts

Ruby scripts are the original apps. Before apps were extreme fajitas and potato poppers, and even before apps allowed you to digitally chug a beer on your phone, there were ruby scripts. These little pieces of code expedite the tedious and repetitive tasks in SketchUp that drive you crazy. If you find that a certain task is taking entirely too long, take a step back and start looking for a ruby script. In this section, you will review several useful ruby scripts and learn how to find and install some others.

f in D rUB y Scri PTS

Advertisement

Some rubies are free and some aren’t. Just as with the 3D Warehouse, you get what you pay for. When you purchase a ruby, typically you can expect to receive support and clear instructions. If you grab a free ruby, you should probably expect to put in a little extra effort figuring it out. A great place to buy rubies and grab a few freebies is at www.smustard.com. Huge collections of free ruby scripts are available at the Ruby Library Depot (Google it), www.sketchucation.com, and www.sketchup.com.

i n STA lling rUB y Scri PTS

Once you have downloaded your ruby, save it to the Plugins folder (for example, C:\ Program Files\Google\Google SketchUp 8\Plugins). Keep in mind that the path could vary, depending on your drive name and operating system. If a ruby is zipped, you must extract the contents to this location. After the .rb file is saved in the Plugins folder, you will need to close SketchUp and re-open it in order to load the new ruby.

TIP Sometimes one ruby depends on another to operate properly. read through any instructions and documentation thoroughly before you try to use a ruby. for example, many rubies will not work without the sketchup.rb and progressbar.rb rubies installed in the Plugins folder.

Newer ruby scripts that are written specifically for SketchUp 8 are packaged as .rbz files. The compressed one-file format makes it much easier to install the ruby scripts. To unzip a compressed ruby, follow these steps:

1. Click on the Window drop-down and choose Preferences c Extensions.

2. Click the Install Extensions button.

3. Navigate to and select the .rbz file and click the Open button.

U S ing rUB y Scri PTS

You’ll frequently encounter ruby scripts that don’t have any directions or documentation explaining exactly how to use the ruby. Once a ruby is installed, you may have to access it from different locations, depending on how the author designed the user experience. The first place to look is in the drop-down menus (such as Draw, Tools, and Plugins) at the top of the screen. If you still can’t find it, open the ruby script in a text editor to gather some clues. Authors frequently include a few notes about how to get started (Figure 8.1).

r eco MM en D e D rUB y Scri PTS

Listed here are a few ruby scripts that will come in handy when you’re using this book and also when you’re modeling in general. Don’t stop here, there are infinite more rubies out there!

Bézier Spline Tool

Once you’ve mastered the Bézier Spline tool, you will have almost no need to use the Arc tool to draw continuous arcs. Furthermore, with this tool, you will have no need for the Freehand tool, which is completely inaccurate. You can download the Bézier Spline tool and other tools at http://www.sketchup.com/intl/en/download/rubyscripts.html

Dashed lines ruby

The Dashed Lines ruby will segment a selected line into several different line types. It is great for creating dashed lines to represent 2D graphics and for creating rare annotations in SketchUp (for example, center lines and column lines). You can find the Dashed Lines ruby at http://www.smustard.com/script/DashedLines

Scale and rotate Multiple

Select a few shrubs or trees and run the Scale and Rotate Multiple ruby to randomly scale and rotate the objects. This ruby is great for quickly making landscape elements look more natural rather than computer generated. You can download it at .

http://sketchucation.com/forums/viewtopic.php?t=17507#p139946

Add hidden layer ruby

When you’re adding a layer in SketchUp, the default is to turn on the layer in all existing scenes. The Add Hidden Layer ruby does the opposite and turns it off, which is typically more desirable. You can download this ruby at http://rhin.crai.archi.fr/rld/plugin_details.php?id=6

zorro Tool

The Zorro tool is helpful when transitioning a sketch model to a refined design, or when breaking a model into levels. With the Zorro tool, you draw a line across geometry that slices through all the geometry, even the groups and components. Typically, a head-on parallel projection view is the best view to use for full control of this ruby. You can download the Zorro tool at http://rhin.crai.archi.fr/rld/plugin_details.php?id=498

instant road Plugin

The Instant Road plugin expedites the creation of realistic roads in SketchUp. This plugin picks up where the Sandbox tool falls short. You can download it at http://valiarchitects.com/sketchup_scripts/instant-road

flatten Tool

The Flatten tool takes any 3D object and reduces it to a 2D symbol. This ruby script will come in handy when a 3D object does not quite render the way you wanted it to render in a plan. You can download it at http://www.smustard.com/script/Flatten

c h APT er Poin TS

☑ If you are performing a task that is repetitive, tedious, and taking entirely too long, stop immediately and look for a ruby script.

☑ Paying for rubies is absolutely worth it. They are usually inexpensive and will save you hours of labor working on mind-numbing, repetitious tasks and searching for freebies.