Model Viewer

As suggested by their location in the "Toys" sub-menu, the Draw Ruby plugins aren't intended to be useful. In contrast, Model Viewer (MV) is (IMHO) a useful tool for developers and adventurous modelers.

By way of comparison, although SketchUp Pro's Component Attributes dialog allows editing of attributes, it does not show as much information about as many types of objects.

Try it out...

To try out MV's capabilities, you'll want a sample model with lots of components and attributes. The following notes are based on the rather substantial (7 MB) Solaire 30" Grille by Igloo Studios' President, Mike Tadros.

Create a new SketchUp window and drag in (ie, import) the component. After the component loads, take some time to familiarize yourself with it, then play with MV, per se:

  • Using the "Interact with Dynamic Components" (pointing finger) tool, animate parts of the model (eg, doors, knobs, lid, rotisserie, shelves).

  • Make sure the component is selected, then bring up the user-facing dialog, using Window > Component Options. Look over the descriptive text, try out the option menus, etc.

  • If you have SketchUp Pro installed (even the trial version), you can use Window > Component Attributes to see SketchUp's default mechanism for viewing and editing component attributes. MV doesn't support editing (yet), but it offers access to more information.

  • Using Plugins > SketchApps > CFCL > Model Viewer, start the plugin. A dialog should appear, with the Components tab selected:


  • As we proceed through the dialog, a number of "Help text" messages will appear; click the associated disclosure triangles to see what topics they cover. (Skim the text if you like; I'm in no hurry. :-)

  • Use the disclosure triangles in the Components tab, reveal the model's first- and second-level sub-component(s). Click on the first-level component (Solaire_30inch_Grille) to select it, then click on the Attributes tab.

  • Click the triangles for "Definition" and "Inst_00000", showing the available information for the component's definition and instance(s).

  • Click the triangles for "Definition / Custom Attributes" and the triangle for base_option.

  • MV is now showing us the names and values of several attributes (eg, base_option, burner_type), as well as the meta-attributes (eg, _base_option_access) for base_option.

    Meta-attributes are used by SketchUp to control the appearance and behavior of attributes. For example, _base_option_options creates a pull-down menu in the Component Options window.

  • Now, under Definition / Method Results, examine the return values from assorted API calls. For example, cd.count_instances tells us how many instances this component definition (cd) has.

    Note that the values are formatted for readability and that, if need be, a chain of method calls is used.


Although MV is already useful, it's clearly incomplete. See the Wish List page for details. And, if you have any suggestions, please let me know.

Further Reading

If you want to know how the Model Viewer plugin works, see (in order) Draw Ruby 1 Internals, Draw Ruby 2 Internals, and Model Viewer Internals.

This wiki page is maintained by Rich Morin, an independent consultant specializing in software design, development, and documentation. Please feel free to email comments, inquiries, suggestions, etc!

Topic revision: r8 - 06 Jul 2012, RichMorin
This site is powered by Foswiki Copyright © by the contributing authors. All material on this wiki is the property of the contributing authors.
Foswiki version v2.1.6, Release Foswiki-2.1.6, Plugin API version 2.4
Ideas, requests, problems regarding CFCL Wiki? Send us email