Sketchup-Ur-Space
sketchup, sketchup tutorials, sketchup tips, sketchup plugins, armedia, vray

Author :

Ruby Scripts - Add extra functionality to SketchUp

Ruby is a programming language that anyone can use to write plugins (scripts) for SketchUp. Once installed, Ruby Scripts can add tools, simplify multi-step operations, and otherwise improve the way you work with SketchUp.

The good news is that you don't need to know anything about Ruby scripting (or programming in general) to use Ruby Scripts that other people have created. To get started, you can find some pre-made Ruby Scripts that we made, below. For links to even more, check out the Ruby Scripts section of our Resources page.

If you're interested in creating Ruby Scripts for SketchUp, please take a look at our Developers page for more information.

For technical support assistance with these scripts, visit the SketchUp Help Forum.

Installing Ruby Scripts

To install a Ruby Script, here's what you need to do:

  • Download it onto your computer.
  • If the downloaded file is zipped, unzip it. You can usually do this by double-clicking on it. Unzipped Ruby Script files have the following file extension: .rb
  • Close SketchUp if it's running.
  • Copy the Ruby Script file into the right location for your operating system: Windows: C:/Program Files/Google/Google SketchUp 8/Plugins, Mac OS X: 'Hard Drive'/Library/Application Support/Google SketchUp 8/SketchUp/Plugins

Using Ruby Scripts

The location of the controls for the Ruby Script you just installed depends on the Script; you access some through the menu system, and others by means of right-clicking on elements of your model. Some Ruby Scripts have their own dialog boxes, while others don't appear in the SketchUp user interface at all - they're just "reference" scripts that provide functionality for other scripts. How you use each script should be explained by its author, probably in the location from which you downloaded the script.

Sample Ruby Scripts

Parametric: You need to install this script in order to use some of the others on this page. Download 'parametric.rb'

Mesh Additions: You need to install this script in order to use some of the others on this page. Download 'mesh_additions.rb'

Bezier: A tool for creating Bezier curves in two or three dimensions. Once installed, "Bezier Curves" appears as an item in the Draw menu. Also a prerequisite script for 'onion_dome.rb', below. Download 'bezier.rb'

Rotated Rectangle: A tool for creating rotated rectangles with your mouse. Once installed, "Rotated Rectangle" appears as an item in the Draw menu. Download 'rectangle.rb'

Shapes: A tool for creating and editing a number of parametric shapes: Boxes, Cylinders, Cones, Toruses, Tubes, Prisms, Pyramids and Domes. Once installed, "Shapes" appears as an item in the Draw menu. This script requires you to also install the following other scripts (see above): parametric.rb, mesh_additions.rb Download 'shapes.rb'

Window Maker: A tool for creating parametric double-hung and slider windows. Once installed, "Windows" appears as an item in the Tools menu. This script requires you to also install the following other scripts (see above): parametric.rb Download 'windows.rb'

Grids: A tool for creating parametric grids. Once installed, "Grid" appears as an item in the Tools menu. This script requires you to also install the following other scripts (see above): parametric.rb Download 'grid.rb'

Onion Dome: A tool for creating onion domes. Once installed, "Onion Dome" appears as an item in the Draw menu. This script requires you to also install the following other scripts (see above): parametric.rb, mesh_additions.rb, bezier.rb Download 'oniondome.rb'

Simplify Contours: Often, site contour data generated by a surveyor is quite dense (more than 5,000 edges). Applying this command to a set of imported contour lines simplifies the geometry, making it easier to work with. Download 'SimplifyContours.rb'

What do you think about this article