Hi All,
![http://www.alexschreyer.net/blog/wp-content/uploads/2010/02/sketchup-ruby-editor-1-530x302.jpg](http://www.alexschreyer.net/blog/wp-content/uploads/2010/02/sketchup-ruby-editor-1-530x302.jpg)
EDIT (3/4/2013): This plugin has been updated to version 3.0. The plugin got a major update! Some of the new features are: better environment stability (editor, scrolling, results, etc.), code completion for SketchUp classes and methods and a variety of other minor updates.
This code editor plugin offers an easy-to-use and visually appealing way to create and modify Ruby scripts directly within SketchUp. These scripts can then be used to create geometry, add functionality or add data within the SketchUp 3D modeling environment. The SketchUp Ruby API provides an extensive set of functions to automatize SketchUp in many ways or create scripted, computational geometry.
I created this editor mainly for two reasons: One is that when I write code, I permanently need to look up documentation. To make this easier, I added a bunch of reference webpages to a browser in a tab. Also, a dropdown above the editor contains some common code snippets that can be inserted at the current cursor position. Version 3.0 also introduces a code-completion feature that you can invoke at any point by clicking CTRL-SHIFT. It contains SketchUp’s classes and methods.
The other reason I wrote this as a plugin that works right inside of SketchUp is that I wanted it to give easy access to the Ruby coding environment and behave a bit more like a real code editor. To accomplish this, I added a bit of jQuery magic to make it look good and have some additional features. I also added the excellent CodeMirror 3.1 syntax highlighting engine. This provides the editor with multi-language code highlighting, correct TAB control, bracket matching and many more features. Just load the plugin and give it a try to see for yourself!
The following video gives a brief overview of the current version:
Youtube Video
You can get this editor from my website (and see a changelog) at:
http://www.alexschreyer.net/projects/sketchup-ruby-code-editor/
For more on what you can do with it, check out my book "Architectural Design with SketchUp" (especially chapter 6):
http://sketchupfordesign.com/
Cheers,
Alex