-
SketchUp loads a Ruby file at startup if it is in the Plugins folder (
C:\Users\<user>\Roaming\SketchUp\SketchUp 2018\Plugins
orLibrary/Application Support/SketchUp 2015/SketchUp/Plugins
). The content of the Ruby file is evaluated immediately, so code that is not wrapped in a method and registered in the UI runs at startup.
Knowing this, you probably have to copy the contents of thesrc
folder into the Plugins folder. -
Alternatively you can side-load scripts from any location if their requirements are specified relative to their loader file (not relative to the Plugins folder). This is the case for these htmldialog-examples.
load "/path/to/downloads/src/tutorial.rb"
-
Check also out the sketchup-bridge project, which provides a different, unified approach to communicating between Ruby and the dialog in both directions.
You can test-drive it with this tutorial extension. If you like it, you can clone the Github project. There is also a sample can be copied into your Plugins folder (before making your own project, renameAuthorName
andSampleExtension
to your personal namespace).