This is a powerful Ruby Console with IDE features like code highlighting, autocompletion and a code editor.
It lets you open multiple independent instances of the console and remembers the command history over sessions.
- SketchUp 2017+
This extension (originating from 2012 & 2014) has been completely rebuilt to take advantage of modern technologies (the new HtmlDialog with modern JavaScript support, Ruby 2.0).
-
Go to the releases page (↑) and download the latest .rbz file. Open in SketchUp Window → Extension Manager and select the .rbz file.
-
Alternatively, you can install the contents of the
src
directory into your plugins folder.
(Menu) Window → Ruby Console+
There are two modes (Ctrl-Tab ↹):
-
The console is a command line interface to try out codes and inspect return values.
With the Enter ↵ key, code will be evaluated (use ⇧ Shift-Enter ↵ for line breaks, or configure it in the settings menu). -
The editor is a full-featured text editor. Here you turn code into a script and save it as a file.
-
Tutorials: You don't know any programming? No problem, because SketchUp is the coolest opportunity to get started and it's super easy with the famous "Try Ruby" interactive tutorial that is included with this extension.
-
Autocompletion and doc tooltips: Intelligent live autocompletion tells you not only which methods you can call next on a reference but provides you also with detailed info on how to correctly use them. Use Tab ↹ to accept a suggestion.
-
Entity inspection: Hover an entity or point in the console output and you will see it highlighted in the model.
-
Get a reference to an entity in the model by picking it with the pointer.
No more selecting and doingSketchup.active_model.selection[0]
. By holding the Ctrl key when the main window is focused, you can select points instead of entities and by holding the ⇧ Shift key you can turn on inferencing. -
Remembers which scripts you reload and reloads scripts automatically whenever they are changed.
-
Open online documentation for the currently focused word (beta) (Ctrl- Q )
-
Binding: An advanced feature that allows to step into an object or class and call methods or access instance variables as if you were locally inside of the class source definition. Try to set binding to
Math
and you can directly call math functions likesqrt
without NameError.
Bug reports and pull requests are welcome on GitHub at https://github.com/Aerilius/sketchup-console-plus/issues.
You can find documentation in the docs folder.
First, run bundle install
to install requirements.
Run bundle exec rake test
to run the tests.
To release a new version, update the version number in version.rb
, and then run bundle exec rake release
, which will create a git tag for the version and push git commits and tags.
To build a new installation package , run bundle exec rake build_rbz
.
This extension is available as open source under the terms of the MIT License.