algorithmic modeling for Rhino
Hello Everyone!
How to change the input params datatype of the compoment at runtime? My Code is as below(ScreenShot):
Unfortunaly, There has an problerm that, When I Click the MenuItem to change the data type of the param, the param name has change as predict, but when I hover to the params, the tooltip content is the param's change before. At the same time, I can not connect the params with Another.
Is anyone Know How to Slove the Problern? Thankyou
Tags:
Replies are closed for this discussion.
Try calling ParameterServer.OnParamsChanged (or something close to that, can't remember the exact naming). You don't have to cache the GH_ComponentParameterServer btw. you can just invoke directly on Params each time.
Alternatively, create a single parameter type which can handle various kinds of inputs without having to be swapped out. Then you could more easily persist wire connections and modifiers.
ThankYou David.
Is there any Code Demo for Dynamic change the parameter of the Grasshopper Component?
No, it's not exactly a common thing to do. Even changing parameter properties such as access, optionality and such is a rare thing during runtime.
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
Added by Parametric House 0 Comments 0 Likes
© 2024 Created by Scott Davidson. Powered by