Grasshopper

algorithmic modeling for Rhino

Is it possible to change the value of a number slider component from a python component? If anyone knows how to do this or where to look to find out, it would be really appreciated. Thanks -

Views: 7770

Replies to This Discussion

The right click help window for the Grasshopper Python node ends with this:

"(There's even a secret ghenv variable)."

A good tip is to NEVER trust intellisense. You never know what you might be missing depending on which editor you're using (this is especially true for the GHPython editor). I try not to rely on the SDK's too much and instead use the modes of introspection which are available in the language itself. I wrote a bit about that here and here. So basically: explore, poke, probe, have fun etc.

Ps. What you call paranoid is what I call good coding practice. But there you go..

Edit: Attached an example of how to introspect a .NET assembly. Thought I had that in one of the links, but I was mistaken.

Attachments:

Hi Person, in the case you still need this: With JetBrains DotPeek you can compile the Grasshopper.dll file, then you can look into all classes, including the ..Kernel.Special class.

Dear David,

Following a similar lino of thught, I was wondering if it is possible to programmatically create sliders using a C# or Python script and use a different script to read in their values.

I would like to create a large number of boolean swithces for a run of galapagos and while in galapagos is very simple to link as many sliders as wanted the same is not true for the other components.

I am thinking to write two custom components, one that creates as many sliders as needed, and another that reads in their values to update the graph.

As there is no SDK for this any help would be greatly appreciated!

Thanks,

Giovanni

RSS

About

Translate

Search

Videos

  • Add Videos
  • View All

© 2024   Created by Scott Davidson.   Powered by

Badges  |  Report an Issue  |  Terms of Service