phessels wrote:Hi Didier,
thanks for all your great work!
Unfortunately, after hours of trying, i too can't get it to show up in the plug in menu.
This is the message i get when starting up SU8:
Error Loading File animation.rb
undefined method `GetString' for nil:NilClassError Loading File attributes.rb
undefined method `GetString' for nil:NilClassError Loading File box.rb
undefined method `GetString' for nil:NilClassError Loading File examplescripts.rb
no such file to load -- examples/box.rbError Loading File ocean.rb
undefined method `GetString' for nil:NilClass...
This error appears to have nothing to do with the tool in this thread... Have you installed other tools or moved files around etc ?
The Examples folder within the Plugins folder contains several example script files that you can activate from Preferences > Extensions [so can 'Ocean']. These are the .rb scripts listed in the error message. They use 'GetString' which is loaded by langhandler.rb which is itself loaded from inside the Tools folder that loads after the Plugins items - however, to ensure that such files are available, then any 'earlier loading' scripts should use "
require 'langhandler.rb'" [they often also "require" other files like '
sketchup.rb' and '
extensions.rb' which provide other vital functionality], which loads them [if they are not already loaded] from anywhere in the list of possible auto-load-folders, this way loading errors are avoided.
The files that are in Tools should NEVER be moved into Plugins.
There should never be files with the same names in Plugins as they will be found first and loaded instead of the Tools ones, and cause confusion; there are some 'collections' toolbar sets that ill-advisedly packaged a number of these Tools scripts [older versions] that users then install into Plugins with unexpected effects!
You must have the latest scripts for v8 in its Tools folder only!!
So, first question... do you have a Tools folder - it should have been automatically made/populated when Sketchup was installed.
Does it contain several .rb files like those mentioned above.
Do you have versions of any of these inside Plugins? [if so remove them!]
If you have 'lost' any of these Tools .rb files then reinstall Sketchup to restore them.
One of the errors also suggests that the Examples folder might not be in Plugins ?
You should leave [have left] all of its contents where they are !
Can you post a screenshot of your folder/files setup ?
EDIT:One final idea... I note you are on MAC.
The
examples.rb uses the code
require 'LangHandler.rb' but the file itself is actually called '
langhandler.rb', similarly the
Examples folder is refered to as
examples/.... On a PC lowercase/uppercase letters in folder/file-names are taken as equivalent, so there are no issues [CAT.rb==cat.RB].
This is the same on a MAC - with the default settings [I think] - BUT because MACs are Unix based you can set a System 'flag' to consider 'Examples' and 'examples' as two distinct folders that can then coexist in the same parent folder, and the same with file-names. SO... do you have that system flag set ? If so can you unset it !?
It can lead to all sorts of issues because Ruby files can be sloppily written and disregard 'character-case'
