algorithmic modeling for Rhino
Fellow GH_Users,
What is the closest method of the GH_Component.SolveInstance in a GH_Param object? In another word, how can I plug into a GH_Param to collect the output value once it has been computed. I found GH_Param.ComputeData() to be the closest but I cannot override it.
I am trying to extract the value of some modified components/param after thay have been solved to send them somewhere else (implementing kind of document constant behavior through modified objects). It's working well in a component by placing a dedicated method at the end of the SolveInstance but a Param type object would be more appropriate.
Thanks!
Tags:
Try this:
protected override void OnVolatileDataCollected()
{
}
Excellent! And now, any idea how I can override the data which is passed downstream of the GH_Param? VolatileData is Read Only .
Thanks
Found something : a protected field GH_Param.m_data which seems to contains the underlying data. Reassigning it at the end of OnValatileDataCollected seems to work but since there is no documentation I don't think that's the proper way of doing it...
Cheers!
Exactly!
Meh, it's fine just so long as you do not assign a null to that field.
Typically what you'd do is modify the data inside the VolatileData instance, rather than create a new one.
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
© 2024 Created by Scott Davidson. Powered by