algorithmic modeling for Rhino
I have two questions.
First, is it possible for a c# component to operate outside of the solver? For example, could the C# component watch a file for changes, and then only run the solver each time a file changes?
Second, can a C# component output data, wait for the solver to complete, then read the results of a parameter node downstream? The example is obviously a very simple example. However, could the component on the left read the latest data, execute the solver, then get the results from the results node and publish it somewhere else?
Thanks!
Tags:
First, is it possible for a c# component to operate outside of the solver? For example, could the C# component watch a file for changes, and then only run the solver each time a file changes?
Yup. The C# code written here is just regalar C#, so you can do pretty much whatever you like. Although the editor is pretty sucky so I wouldn't recommend developing large projects with it.
Second, can a C# component output data, wait for the solver to complete, then read the results of a parameter node downstream?
Yup. Although you'll have a hard time accessing this information as soon as it's computed, but if you're willing to wait until after the solution is done, you can harvest the data.
I can come up with an example in a bit.
The attached C# collects the data inside all parameters whose name matches the list of names provided, and writes them to the Rhino command history.
It does this after the solution ends, but in general it would be very difficult to inject this data back into the GH document while the solution lasts.
David, I just look over this code and it is perfect. Exactly what I was hoping for.
Thanks!
Welcome to
Grasshopper
Added by Parametric House 0 Comments 0 Likes
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson.
Powered by