Grasshopper

algorithmic modeling for Rhino

Whenever some parameter input gets a new value, the SolveInstance is automatically called, but when the "Clear Values" option is used, the SolveInstance function does not respond. How can I detect it when the input gets cleared?

Views: 536

Attachments:

Replies to This Discussion

If you clear values then the parameter will be empty. Empty mandatory parameters will short-circuit the component snd SolveInstance will indeed not be called. If you want SolveInstance to run even if the parameter is empty, then you must make the parameter optional. You should do this in RegisterInputParams

pManager[i].Optional = true;

Thanks for the response!

Is there a way to detect it inside the code, when those mandatory empty parameters short-circuit the component? From the outside it's visible, as it turns orange, and that is also what I need. Making the parameter optional gets me into SolveInstance, but I need some way to signal it when a parameter is expected. How can I make the component go orange?

While we're on the topic of how the Grasshopper solver and other under-the-hood mechanics of GH operate, is there any documentation available on this subject? Or is most of the information decentralized and scattered throughout the forum in the form of comments from David and other users? Something as simple as a diagrammatic overview of the feedback loop of the solver could be very helpful.

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