Initiate Grasshopper with some groups disabled?

Hello everyone.

Is there any way to open a Grasshopper file with some groups disabled? Selecting them by the name of the group.

I have tried something like this:

However, it runs the group and then disables it, so it doesn’t work as expected.

pretty sure if you save a gh file with groups disabled, the same gh file will open with the same groups disabled

But I don’t want to do that. I want to open the Grasshopper file with those groups disabled regardless of how I saved them.

Suggestion:

  • What about using a loop as first action after starting up. it runs just once. And disables all groups you do not want.

How can I do that?

open Grasshopper
in the main menu Solution → disable solver

now open the file in question.
disable the group
enable the solver

if you search for an interactive approach

stream gate
or
data dam

might help

what exactly is the scenario you want to implement ?

Good question. I did not try myself.
It might not work at all, because the resolver might first evaluate the complete code, before enabling/disabling parts.

Yes, that’s the point.

Next try: :slight_smile:
What about splitting it in separated files? Does it completely resolve all files first or just works with the latest imported/exported data?

That’s not an valid solution for me…

Maybe there is an option to always save the file with the desired groups or contents disabled

I don’t know that…

It is possible to disable canvas objects when a Grasshopper file is opened by exploiting how the canvas compute order works. Here’s a recent example that demonstrates this for data dams, but it should work for any object type, I think:

See this post for a solution that doesn’t raise errors.

1 Like

@Alfredo_Peña here’s a quick script building on the example I posted above that might work for you:


250207_LockedNamedGroupsFirstRun_00.gh (9.1 KB)

Thank you so much!

1 Like