I have been gone for a while, and everything has changed
I have tried to copy one of my plugins from SU8 to SU2016, but nothing happens?
In SU8 it was like this:
D:\Program Files\Google\Google SketchUp 8\Plugins\my_plugin_loader.rb
D:\Program Files\Google\Google SketchUp 8\Plugins\my_plugin\main.rb
but in SU2016 there is no plugin-folder? Do you to install it somehow?
First, user plugins are no longer installed in Program Files folders. They are installed in User Data folders. But due to the next points I wonât tell you where.
Second, part way through the SU8 lifetime, a new way to install extensions was added to the Preferences panel. In addition, the Extension Warehouse and sketchUcation plugin store matured significantly, allowing you to download and install extensions directly. These three ways are now the supported way to instal extensions, not by copying the Ruby files.
Third, as of SU 2014, the version of Ruby used by SketchUp for plugins changed. This was a major upgrade, and many old plugins broke. If you simply copy old plugins from SU8 to SU2016 a significant fraction of them will fail, potentially causing SketchUp to crash on launch.
So, the strongly recommended practice is to obtain new copies of the extensions and plugins you need and to install them via the Preferences panel, Extension Warehouse, or SketchUcation plugin store systems.
As was said - always get the latest version of Plugins - they might have been rewritten to suit newer SketchUp methods and Ruby-versionâŚ
Then install the RBZ using SketchUpâs: Preferences > Extensions > Install Extension⌠button to put it into the correct place, automatically, without recourse to a manual botchâŚ
Failing that⌠in the newer versions of SketchUp the Plugins folder got moved into the userâs AppData file path, so there are now no issues with security-permissions etcâŚ
Your v2016 Plugins folder path is something like:
Any error-messages in the Ruby Console when you try to use it ?
It all suggests that itâs incompatible with the newer SketchUpâs Ruby/syntax - itâs less âforgivingââŚ
Have you not found a newer version of its RBZ from say the EW or SketchUcation PluginStore ??
Actually the plugin is useless but it my hope is to continue to develop it. It uses the webdialog. Do you know if the SU16 webdialog is able to send hashes? In 2012 it couldnât as far as I remembered.
No version support that our of the box - converting Hash to a JSON object when calling from Ruby to JS. But itâs perfectly doable.
In SU2014+ you get some help from the fact that the StdLib is shipped. so you can just require 'json' and use .to_json on your hash. On older versions you just have to craft the JSON yourself.
I always use some boilerplate wrapper on top of the webdialog class. I make my own sub-class and add a function that takes a JS function name as first argument and then a set of arbitrary arguments which I convert to a JS string which in turn call .execute_script.