Sketchup.find_support_files('rb', 'Plugins') Returns Nothing?

Shouldnt the above command return a list of plugins? I get nothing and am wondering if something is broken? All of my plugins seem to be working with the exception on one (Oob_Layouts) where a list of presets is not populated.

Make sure OSX has not converted your quotes to smart quotes. Notice the difference in quotes from your title to the following:

Sketchup.find_support_files('rb', 'Plugins') 

Search this forum for smart quotes for more topics on the subject and to find out how to get around them ot turn them off.

I was really hoping that was going to work…but alas…same result after I turned off smart quotes!

What happens with:


I don’t recall Sketchup.find_support_files ever working on a mac…

to see a list of .rb files you need to use other methods…

path = Sketchup.find_support_file('Plugins') + '/'
rubys = Dir.glob(path + '*.rb')
rubys.each{|r| p r.gsub( path, '' )}; nil


/Users/willkostelecky/Library/Application Support/SketchUp 2017/SketchUp/Plugins

John, that is interesting. My issue is actually with the Oob-Layouts plugin. Hopefully this gives the author a clue. Will

Never use find_support_files. It looks for files in the default plugin locations which may not be where an extension is installed. The user might just as well load it from their dropbox or any other location. Instead use relative paths or absolute paths based on the actual file location you are in. E.g. a path to a file in the same directory as the ruby code itself can be expressed as following.


Edit: More info here:

1 Like

… OR:

having required “pp” (the loader for the “prettyprint” utility,) ie:

require "pp"


Dir::chdir(Sketchup.find_support_file('Plugins')) {
  pp Dir::glob('*.rb')

Then to know which files actually were loaded by Ruby:

pp $"

… which is the same as:


Thanks all. Hopefully this will provide some clues as to some other stuff going wrong as well.

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