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.
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.
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.
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.