Grasshopper

algorithmic modeling for Rhino

Hi I am new in programming for Rhino/Grasshopper, first of all sorry for my english. I am trying to make a component with 3 input parameters (a button, a slider and the result of some calculations) and that component has to make something when the third parameters changes. I was trying to use the "ParameterChange" event but it only fires when you connect o disconnect a component to that input (I also try with "Change Object" but it also don´t fires). I have to make it with some event that indicates the change of that parameter because to it may be connected a large piece of code with an unknown time of execution. IS tehre any event that fires when an imput parameter of a component changes?. I also take a look at the "Solution Expire" event but it fires when any parameters change but not with a particular one (if I use it with my component, I don´t know if the change is of the input parameter that I want. And If I try it with the last component of the program that is connected to that input, it only informs me that the solution is not correct but not of the end of the execution). Thanks in advance.

Views: 1634

Replies to This Discussion

A little trick would be a extra global list in your plugin definition which you can compare with the current input list in the solve function ... Little Performance lost nur easy going

The problem with this solution is that I don´t know if two consecutive executions of the "other code" can make the same numeric result so in this case I cannot difference if it has change or not. Thanks for the idea. 

I am trying a different solution, I was obtaining a GH_Component which is connected at the input parameter that I want to control the change. I ask this componet for its phase and when is in "Computed" state I know that the value is valid. The problem is that I can´t access the output of this GH_Component. Is there any way to access that value?. Thanks in advance

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service