Having used Sketchup as a hobbyist for a number of years I finally decided I needed to get to grips with Ruby and the API. I learn best by setting myself a challenging but do-able task so I decided to try and build a plugin to toggle between design options.
Sure you can do this with Layers but you have to turn the current layer visibility off then turn the new layer on for each change of design. You’ll also need to add a prefix to the layer name to keep the options grouped in the list. You may also have other items on one of the layers which you don’t want to hide. You can do it with Scenes but Scenes are primarily about storing views and you’ll either have to forego this facility or have the same set of scenes for each view option. With, say, five different scene views and four different designs you have twenty scene tabs to manage and sequence. I chose to add the designs to a common group and toggle one of this group to be visible at any one time.
To use the plugin:
- select the different design options and add them as groups (or components) to the Toggle Group using the Plus button in the menu bar
- use the First, Previous, Next, or Last buttons to shift between options. Next and Previous wrap around like a slide carousel (ask your dad)
When you’re done:
- click on the Minus button to explode the Toggle Group back to its component groups or components
Here’s a video showing the idea.
… and here’s the extension (version 0.2)
ptb_toggler.rbz (146.0 KB)
I would welcome any comments on whether it is felt useful, any ideas for improvement, or my coding.