algorithmic modeling for Rhino
Is it possible to get access to the GH_Cluster object(s) that a cluster document belongs to from code written inside that cluster? I can get the parent document with GrasshopperDocument.Owner.OwnerDocument() but I'd really love to be able to talk to the cluster objects themselves.
Tags:
Try casting Owner to a cluster object. Does that work? (sorry can't test myself at the moment).
Works beautifully! Thanks David.
Andrew, did this work for you? I am trying something similar but no success.
GH_Document thisDoc = OnPingDocument(); //the cluster document
GH_Document parentDoc = thisDoc.Owner.OwnerDocument(); //the document that owns the cluster
GH_Cluster clusterComponent = (GH_Cluster) parentDoc; // cannot convert GH_Document to GH_Cluster error..
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by