Missing ghpython documentation?

Hi @cameronbehning

We don’t want to keep anything away, when you take responsibility, you are free to do anything. The cases you mention are evidence for that. We also generally only help in public. There is however a good reason not to encourage beginners’ experimentations just on this one – not without a word of warning.

The naive implementation will break Grasshopper definitions solving, might possibly lead to loss of data and doing the wrong operation to the Grasshopper graph at the wrong time might lead to users of the code that cannot open or cannot save files anymore. How good is that? Of course, we don’t want that to happen. And I’m sure neither do you.

In particular, regarding the usage that you are after, it’s possible or not, depending on the solution timing. You are allowed to change the topology of the solution, with all precautions, when it’s not computing. This means, not inside the script solver itself. This is all also already explained, publicly, in the discussions here below.

I hope this makes it a little clearer. There’s no “rest of us”. These are all examples. Like always, in code, there are hundreds of ways to get to similar outcomes. And all variables exposed by ghenv, mentioned above, are documented in the Grasshopper SDK. Thanks,


Giulio Piacentino
for Robert McNeel & Associates