Am I the only one who got confused using ghpythonlib.components?

Hi @grasshoppertrainer,

You are asking advanced questions. Let’s have a look together.

This is not possible. There is no SDK method to do this, so no library can replicate this. The right-click behavior is defined per-component, so there is no way to repeat it automatically at present. @DavidRutten said he would study some options for GH2.

These components are very special, and they are usually a way to represent a looping or conditional construct. The library does not allow to add arguments at present.

The old version of the library, version 1.0 for Rhino 5, did not allow this at all, so you are correct about Rhino 5. In newer Rhino 6 SRs, you can do that with the .tree. version of components. See:


Finally, a word of caution. The more advanced the topics you will explore, the more hindered a fully-functional library that exposes an underlying graphic library might become. The purpose of the ghpythonlib library is to allow people who only used GH definitions, to automate tasks such as a for loop or a while loop in Python, thereby allowing some more advanced interactions. Another purpose is also to automate some plug-ins that have no SDK. If your goals are much more cutting-edge, you might want to use rhinoscriptsyntax or RhinoCommon. All of Grasshopper is written via RhinoCommon.

3 Likes