Grasshopper

algorithmic modeling for Rhino

Hi, I would like to collect all messages of all components with one single script component from the top level document so that one will be aware what's going on even inside clusters.

Is there a way to iterate and access components inside a cluster from the outside?

I noticed the "document" method of GH_Cluster, however, this specific class has not been documented. I have no idea how to deal with it.

Best regards, WP

Views: 407

Replies to This Discussion

Hi,

I have writen a cluster named cluster_protector which maybe solve your problem when put it into a cluster!

Attachments:

Tnx Panda, that could be a way. However, that means that every cluster should contain it. I found a way to iterate over "nested" objects. That way one only needs on component at the very top. The proof of concept go goes something like this:

for obj in doc.Objects:
    if obj.Name == 'Cluster':
        cdoc =  obj.Document(None)
        for cobj in cdoc.Objects:
            print cobj.Name

RSS

About

Translate

Search

Photos

  • Add Photos
  • View All

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service