SketchUp Version 0.1 Tutorial

In this tutorial we will explain how to connect pachube to an object in Google SketchUp so that the object is scaled according to a live pachube feed.

1. Software installation

1.1. Installing Google SketchUp

For this tutorial you will need Google SketchUp installed. This is free from: http://sketchup.google.com/download/
(the pachube plugin has been tested on versions 6 and 7 for Mac and PC)

1.2. Install the plugin

Download the Pachube2Sketchup plugin from here: http://sketchup.pachube.com/plugin/pachube2sketchup_v0.1.zip

Unzip the Pachube2SketchUp folder and put it in the sketchUp plugins folder which can be found:
On a Windows PC:
C:\Program Files\Google\Google Sketchup 7\Plugins\

On a Mac:
Macintosh HD/Library/Application Support/Google SketchUp 7/SketchUp/plugins

Its important the files are in a seperate folder or the plugin will load by default which may cause problems.

Pachube2Sketchup will eventually be a fully blown implementation for SketchUp that will affect component info. For now Pachube2SketchUp is a simple interface to connect live feeds with SketchUp Models.

1.3. Download the Tutorial Scene.

Download the SketchUp scene for this tutorial: http://sketchup.pachube.com/tutorial_scenes/pachube_tutorial_scene_1.skp

2. Connecting to Pachube

Once the plug-in is installed, open SketchUp, and load the tutorial scene mentioned above.

It should look something like this:

tutorial scene before scaling

Note that this scene is NOT a fundamental component of the Pachube-SketchUp connection, and you can of course use Pachube2SketchUp with your own scenes.

We'll now load and start the Pachube2SketchUp plugin.

Open the Ruby Console window from the menu Window>Ruby Console.

In the console type:

load 'pachube2sketchup/start.rb'

A new window should pop up with the plug-in inside.

Click on 'Start Loop' to have the plugin connect to pachube and retrieve the indicated feed periodically. The first time you do this, an authentication dialog will pop up to ask for your Pachube username and password.

Simple Scaling of a Cube:

In this basic example Pachube2SketchUp tells the object to match its scale to the Pachube stream every few seconds.

Choose the pachube2sketchup scaling script

In the Pachube2SketchUp window, in the section called "Send data to sketchup", change the pull-down menu from "Please select a script" to "Scaler".

Select the Object you wish to scale in sketchup

You should minimize or move aside the Pachube2SketchUp window to make it easier to select the object you want to scale.

Here's what our tutorial scene might look like after selecting all of the objects:

tutorial scene during object selection

Now go back to the Pachube2SketchUp window and click "Set Selected Objects". This registers the current selection in SketchUp as the target of any scale operation.

Scale!

Press Scale and the object(s) should rescale suddenly.

This will scale it immmediately and once only.

tutorial scene after applying a scaling according to a pachube feed

You can press "Loop Scale" to make the scale operation run periodically, to keep the object up-to-date with the feed.

Known Issues

  • Closing the pachube2sketchup webdialog doesn't reliably stop the looping (neither the http request loop, nor the apply-values-to-sketchup loop)

Tutorial Resources

References