One plugin place for few SketchUp versions

Is there any way in Windows to load the plugin to a few places?

I am using git and a few sketchup versions to check the compatibility of the plugin.
So I have

  • folder with git repositiory
  • plugin folder 2022
  • plugin folder 2023
  • plugin folder 2017

to check if the plugin works well everywhere.
I wrote a simple python script to copy files from plugin to git etc. but it is little time consuming. Especially when you need to work on few sketchup version.

Do you know any way to load the plugin from a specific path?
To have only 1 version of plugin and connected a few versions of sketchup.

I did not tried this, but seems it fulfils you needs…

https://extensions.sketchup.com/extension/a9f18009-29cc-4c43-a0a7-e018e7a6563b/extension-sources

or this:
Additional Plugin Folders | SketchUcation

3 Likes

Wowowowow!
Thanks for it!

Just tested @thomthom plugin.Thanks for writing that plugin.
It is working, even refreshing the file is working. Nice!

One thing do not work, but for me is ok.
When I am loading files by ‘Sketchup.find_support_file(name, PATH)’ the plugin didn’t find it.
Tried using full path and failed
Ended with a manual copy of component files into plugin sketchup folder and it is working.

1 Like

This method is hard-coded for finding SketchUp’s support files and folders, not extension files. It looks in certain paths that your code cannot control very well.

Read about Kernel#require and how it uses the global $LOAD_PATH array to find files.

@RafaFiedo

Using a script language of your choice, create symlinks from the SU plugin folders to your git repo. You can also use a script to remove them. Most plugins would need two symlinks, one for the root file and one for the folder.

I’ve done that for years…

For flexibility to install extensions to any location, avoid Sketchup.find_support_file. For more details:

3 Likes