Testing an extension script question

Hi All,

I’ve been teaching myself Ruby for the past few months and have finally dived into scripting my first extension. I am wondering if there’s a better way to test changes to your script than the current method I’ve been using; restarting SketchUp every time I make a change.

It’s mostly because I have a lot of extensions I use for work, so it takes a few seconds to load, which adds up overtime.

Thanks!

You can use the global load() method to reload individual files as you test changes. (You must use the .rb file type with this method.)

Ruby is a dynamic language which means (generally) that objects, modules, classes and their methods can be redefined at runtime.

Thanks Dan! I appreciate the quick response, helped me a lot.

I often include a reload method in my extensions to easily reload all the Ruby files for that extension:

2 Likes