SketchUp Ruby Code Editor updated to v. 4.3

As part of my recent effort to update all my SketchUp extensions, I also went through the lines of code that make up my Ruby Code Editor extension and gave it an overhaul. Besides some bug fixes, there are also new features that I will be highlighting in this post.

You can also watch an overview in the video posted below. But in short, here’s what’s new in version 4.3:

  • Each time you open or save a file in the editor, the Ruby working directory now switches to the file’s location. This helps with relative file locations. Also, the file and its complete path is now loaded into the editor tab and shows up when you hover over it. Previously, you could only see the file name.
  • When you encounter an error in the code and Ruby prints it in the feedback box at the bottom of the screen, this feedback now includes the line number. This should help significantly with debugging.
  • I added a menu item under the Run menu that allows you to execute a Ruby file that is not loaded into the editor (using Ruby’s load method). This is useful if you work on files that have dependencies (e.g. with a require statement). Your workflow with those files can now be: Load file into the editor, work on it, save it (Ctrl-S), run it as an external file (Ctrl-L), and check that everything works as expected. Errors will get printed in the feedback box, although at this point line numbers won’t be shown.
  • There is now a new menu item that lets you open your file browser (File Explorer or Finder) at the location where SketchUp stores your installed extension files. This is just added as a reference in case you need it.

In addition to all this, I updated the editor’s colors to match SketchUp’s own UI colors a bit better (i.e. I basically abandoned the orange).

Hope you find the new version’s features useful. As always, feedback is much appreciated. And if you haven’t updated to this version yet, open the Extension Manager dialog in SketchUp and click the update button.

Comments and Reactions