Grasshopper Libraries Local Environment

Hey :slight_smile:

I was thinking that maybe it will be cool to make it possible to attach the libraries used in GH with the GH definition itself, so later if you send the GH definition to someone, he will receive a folder with GH file + library file, that will contain all used plugins. And when he open it in this folder, it will loads up everything right, without a need to install all these things by himself.

If there is such option right now - then let me know! I know that there are some plugins that are installed differently, but still 99% are just dlls stored in one place.

I believe GH does this by default? When you open a file with components outside your plugin library, you get a pop-up window with an option to install.

Does that help you?

~ ~ ~ ~ ~ ~ ~ ~
Kaushik LS
Chennai, IN

I believe this is what Freighter does.

1 Like

I believe there would be a security issue here. I also wouldn’t want opening a gh file to cause unforeseen conflicts personally, much better to have control of what libraries I have installed and why. I get the idea, but looking at the wider issues personally I wouldn’t be in favour.

no more of a security issue than opening any GH script, which can already contain arbitrary executable C#. You could send someone a GH script today that would delete files off their machine, or run terminal commands.

1 Like

@Kaushik GH by default just shows what you have to install, it’s ok, but at the same time it’s not enough, cause it still makes you install all of it manually

@andheum yes, it looks like it is something like that, but I think that it should be built-in :slight_smile:

@johnharding not really. I mean you do this all the time when you install any soft that you own right now on your computer - it goes with the .dlls with other libraries used, and you don’t have a problem with it. I think it can function the same way.
Also with this approach you will still own your own main folder that contains all these libraries that you installed by yourself manually, but when you open this other script, then it will use those locally stored libraries.

I noticed there is a check box to Disable Solver after a crash. Maybe, something similar when we open a new file. But, selecting every time would be a hassle. Maybe some kind of a global setting that can be switched on, when one opens a file from an unknown source?

1 Like

Of course I understand that (and the risk of opening a gh file), but it doesn’t mean it should be encouraged!

I would argue keeping as much as possible explicit (in terms of my knowledge as a user as to what is being installed) is a sound approach. Maybe if such a system made it explicit on what libraries were about to be saved locally and run it would be fine, which to be fair seems to be the suggestion of the original comment.

I just worry about the comment: “without a need to install all these things by him/herself”!

Such approach exist in Pycharm. You just choose which, let’s say “environment” you want to use, and every environment can contain different libraries (in fact libraries + interpreter in that case).

Right now the usage of GH plugins is a bit discouraged, especially when you want to collaborate, because it means that every collaborator need to manage the same plugins with the same versions and so on. And you cannot easily store many versions of the same plugins, which means that if you have let’s say 3 scripts, and each of them is using different version of the same plugin, then you can only open it with the version you have recently installed.