Add additional folders to Grasshopper Folders.UserObjectFolders

Following up from this thread: [Wish] Load external ghuser files by ghlink

We are developing a new folder structure for installation of Ladybug Tools new plugins and as part of that we want to move the UserObjects out of the default UserObject folder. It looks like Grasshopper currently looks into two main folders for UserObjectFolders:

  1. C:\Users\%USERNAME%\AppData\Roaming\Grasshopper\UserObjects
  2. Sub-folders under C:\Users\%USERNAME%\AppData\Roaming\McNeel\Rhinoceros\packages\6.0

There is an Add method under Grasshopper.Folders.UserObjectFolders but it doesn’t seem to work. Also we need to add the folders before loading the Grasshopper itself.

Is it even possible? and if yes how should we do it?

1 Like

It looks like Grasshopper.Folders.UserObjectFolders returns the default GH user objects directory that you found as well as all of the directories for installed plug-ins. If you are installing a Rhino plug-in, you should be able to have the ghuser files next to or in a subdirectory of your plug-in’s folder.

Beyond that I’m going to need @DavidRutten to weigh in.

1 Like

Hi @stevebaer
Thanks for your reply.
I believe what you are saying is install the Rhino plugin inside the rhino folder, GH will load files from this directory of installed plugin. But I don’t think this is true when we want to load GH userobject from outside of Rhino/GH folder structure.

Here is a test I load Plugin from user folder, and Grasshopper.Folders.UserObjectFolders doesn’t load anything from this folder.


I am not sure if @DavidRutten could add support loading *.ghuser files by *.ghlink. or anything way to add a folder to Grasshopper.Folders.UserObjectFolders.

1 Like

A slight correction… User-objects are loaded from Grasshopper.Folders.UserObjectFolders, which currently includes the default user-objects folder and the individual installation directories of any installed (.yak) packages. It doesn’t include the directories of installed (.rhp) plug-ins.