How can I access special options of a grasshopper components in python?

I’m using the “ghpythonlib.components” in python and I’m having trouble accessing special options accessed through right-clicking grasshopper components in ghpython. How would I do that?

For example, the Bounding Box component in grasshopper has “Per Object” & “Union” options which can be switched by right-clicking and selecting in the context menu. Many grasshopper plugins have similar interfaces and when I try to use those components by importing “ghpythonlib.components” and calling those functions, it defaults to the initial option. Any way to change this when writing it in code so I can access the suboptions?

Did you enable ‘List Access’?

P.S. It’s remarkably difficult to get this to work! I’m failing so far.

This seems to work?

  • Enable ‘List Access’
  • Set ‘Type hint’ to ‘GeometryBase’
import Rhino.Geometry as rg

unionBox = rg.BoundingBox.Unset

for i in range(len(G)):
    bBox = G[i].GetBoundingBox(True)

a = unionBox (4.7 KB)

Thanks for the reply is the rhino common method does not work and not what my question was about. What I’m trying is to use grasshopper plugins through python using gh.pythonlib.components and change the options accessed by right-clicking the component. The bounding box component was just an example of type of operations settings I want to access using grasshopper plugin. Many of grashopper plugins that I’m trying to use in python editor have these options and there seems to be no way to change these parameters when calling it through python

Oh well, silly me, I know better than responding to a question when no code/geometry is posted. :laughing:

Info. from this page: