Grasshopper

algorithmic modeling for Rhino

I have a custom component which sometimes triggers a recompute using a call to expireSolns() on the document... which seems to be working fine.  Problem is, when the component is instantiated inside a cluster it calls for an update on the cluster document but does not know to call for the document that owns the cluster.  

Is there a way to find out if my current document is a cluster and, if so, where it is instantiated?  

Or, even better, if the solution expires in my cluster shouldn't a change in the cluster outputs also trigger a the containing document to update based on those data values?  Doesn't appear to be doing so... perhaps this is because the containing document didn't trigger the cluster to resolve from itself?  Or perhaps I just have something wired up incorrectly.

Cheers & Happy New Year!

    - Brian -

Views: 618

Replies to This Discussion

Hi Brian,

 

This discussion is quite old...i have to solve a problem with a component that is owned by a cluster too. So i found your post.

 

This is a simple way to find out if the current document is a cluster:

 

if(owner.OnPingDocument().Owner != null)
    Print("This is the cluster. " + gh_doc.DocumentID);

Did you manage to get some other results with your cluster issue? It's pretty unclear from the sdk how the clusters work. The Grasshopper.Kernel.Special Namespace, that holds the GH_Cluster class is missing in the sdk help :-(

Best regards

FF

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