How to access Cluster objects' content with Python3

Hi (@dale)
I’m having difficulties understanding the IGH_DocumentObject on Python3.

Accessing the contents of a GH_Cluster in Python2 or IronPython works, but converting to Python 3, the cluster object is not a cluster object at all anymore.

How can I access the content of IGH_DocumentObject in Python 3?
OnPingDocument only gives me the parent, but not the content itself.


Ip vs P3.gh (13.6 KB)

I don’t think it’s possible, at least not until 8.7 at the earliest.

The IGH_DocumentObject reminds me of these known issues:

https://mcneel.myjetbrains.com/youtrack/issue/RH-81135

@Toni_Osterlund

Try

isinstance(obj, Grasshopper.Kernel.Special.GH_Cluster)

As @James_Parrott pointed out there is a bug related to this that we have fixed for the next version

@eirannejad

I tested this before, but I could not get it working.


Gh1.0.0008
Rh8 SR5 (8.5.24072)

I wouls also like to point out the mis-aligned “zoom box” from the component to the script window.

1 Like

@Toni_Osterlund We have fixed this bug for the next version of Rhino (8.7). You can download the 8.7 Release candidate in about two weeks

1 Like

I also have a ticket to fix the cone problem

RH-75781 Script editor Component cone wrong.