Ruby API in 2017


#1

I just updated from SU8 to 2017 (I know, that was a big step). I have some .rb files from SU8 that I want to load into SU2017. The documentation says to put them in “SketchUp 2017/Pugins”. That folder didn’t exist, so I created it and put the .rb files there, but they don’t show up automatically as they did in SU8. The Extension Manager seems to only look for .rbz files. Is that required now? Is there some documentation on how to create them? I have only been able to find documentation on loading pre-existing extensions from the warehouse.


#2

The correct Plugins folder would be in User/AppData/Roaming/SketchUp/SketchUp 2017/SketchUp. You should not make one in Program Files.

You should also not be copying plugins or extensions from your ancient version to the new one. That’ll cause you problems. Instead, install fresh copies From the Extension Warehouse or Sketchucation’s Extension Store. Most are there.

RBZ files are compressed extension files which SketchUp can work with using Install Extension to automatically install them correctly. The Extension Warehouse and Extension Store plugin can also automatically install RBZ files.


#3

These are not plugins from a “Store”. They are plugins I wrote from
Sketchup 6 through Sketchup 8 (GeoSketch, sph4bar), so I have them as .rb
files, not .rbz. One is a file I wrote recently under SU8, and want to run
it in SU2017.

Does SU2017 no longer support .rb files? Where do I find documentation on
how to create a .rbz file that SU2017 will recognize?


#4

No. SU2017 still uses .rb files.

Making an rbz file is easy. Collect all the associated files and folders for the plugin and compress them into a ZIP file with something like 7Zip. Then edit the extension changing it from .zip to .rbz.

You’ll also need to make sure that the RB files conform to the current version of Ruby being used by SketchUp.


#5

The documentation does not (or should not) say to do this any more,
as this has NOT been true since the release of SketchUp 2014.

If you find documentation that says this online, please report it, in the following category:
Meta : Help Center - Report a Problem

As Dave said, with the release of SU2014, which switched to running Ruby 2.x, finally Ruby had unicode character support, which allowed use of unicode characters in path strings, which allowed the user plugins to be moved into the user’s %AppData% folders (where user data belongs.)

With recent releases (2017) more and more of SketchUp’s user data is being moved into the %AppData% folders (ie, Materials, etc.)

You should take some time to catch up with the Release Notes page:
https://help.sketchup.com/en/article/141303

https://extensions.sketchup.com/en/developer_center/ew_developer

SU up thru version 7 used Ruby 1.8.0 on PC. (various newer versions on Mac.)

SU 8 and 2013 on PC used Ruby version 1.8.6-p287 (but v 1.8.5 on Mac.)

SU 2014 - 2016 finally both editions (PC and Mac) ran Ruby 2.0.0-p247.

SU 2017 runs Ruby 2.2.4-p230.

Most breaking changes happened between the 1.8 and 2.0 trunks.
So good search terms are: “ruby breaking changes”

I posted links to the change files from the Ruby source repositories in this post:


#6

This topic was automatically closed after 91 days. New replies are no longer allowed.