SU make 2014 and ruby console : plugins folder?


#1

Bonjour
SU make 2014 installed =OK
I want to write dôme ruby code.
How to ?
No plugins folder.
Creating Plugins folder

Test : load 'hexa.RB’
Error message
I’am Berry disappointed !
Some ‘usine à gaz’ (in french)
Maybe help ?
Thanks


#2

SketchUp Developer Release Notes webpage said:

What’s new in SketchUp 2014

We have made many additions and improvements to the SketchUp Ruby API. These changes include some big and potentially code-breaking changes in this round of SketchUp. We strongly recommend all developers test their scripts for compatibility with 2014.
Upgrade to Ruby 2.0 and Stdlib is now included

We have upgraded to Ruby 2.0.0 p247 on both Windows and Mac platforms.
We are now shipping the Ruby Standard Library with SketchUp.

Ruby now supports proper unicode strings.

Plugins on Windows have now been moved outside the SU Installation folder.

  • On Vista, Win 7, 8:
    C:\Users\<username>\AppData\Roaming\SketchUp\SketchUp 2014\SketchUp\Plugins
  • On Win XP:
    C:\Documents and Settings\<username>\Application Data\Roaming\SketchUp\SketchUp 2014\SketchUp\Plugins

On Windows, we also load plugins from a user-independent support directory.

  • On Win Vista, 7, 8:
    C:\ProgramData\SketchUp\SketchUp 2014\SketchUp\Plugins
  • On Win XP:
    C:\Documents and Settings\All Users\Application Data\SketchUp\SketchUp 2014\SketchUp\Plugins

This path is only loaded to the $LOAD_PATH array if the folder exists when on the user’s machine when SU starts.

… much more …

:bulb:

Also … read the SketchUp Application Release Notes for all the releases you missed. (You can use Google translate to translate the pages into Francais.)


#3

You can also open your default user’s Plugins folder by using this line in the Ruby Console:


*Vous pouvez également ouvrir le dossier Plugins de votre utilisateur par défaut en utilisant cette ligne dans la Console Ruby:*
UI.openURL("file:///#{Sketchup.find_support_file('Plugins')}")

Do NOT make any other folders. Any .rb files in the default Plugins folder will auto-load when SketchUp starts. Alternatively.
load "hexa.rb"

will also load that file from the Plugins folder, IF it is in there.


*Ne pas faire d'autres dossiers.* *Tous les fichiers `.rb` dans le dossier Plugins défaut sera auto-charge lorsque SketchUp commence.* *Alternativement.*
load "hexa.rb"

sera également charger ce fichier dans le dossier Plugins, si elle est là.



#4

Thanks
Now all work fine