algorithmic modeling for Rhino
Hello,
I'm trying to change the values in a panel with code. I've found out that the values can be added with the grasshopper.kernel.special.GH_Panel.addvolatiledata method. However this method does not update the value to the downstream components. The only way to see the updated value is to add another panel to the downstream and and then the value updates to this panel. I assume there is another method that needs to be added but I have no idea what. (in below the code (copied from another example of David).
As a separate subject: Is it possible to get documentation to the "special" namespace?
Tags:
If the text is not fed in via an input, it lives in Usertext, but if you are plugging something into it, it is VolatileData. I learned this from Andrew Heumann in one of his posts. I ran into a similar issue when developing a python component and ended up sticking with UserText. I'm sure there is a better way, but this worked for our use.
Grasshopper.Kernel.Special.GH_Panel.UserText
I wrote a python component that checks the active canvas for a panel with a certain name, if it finds it, it updates the value, if not, it creates the panel and then sets the value. Here is a screen shot of the relevant parts: (this works in R5 and R6...for now.) If the output of the panel is connected to anything, it passes values just fine.
There are some relevant discussions here about setting panel text progamatically. I'm not sure I answered your question, but maybe this helps.
http://www.grasshopper3d.com/forum/topics/accessing-to-gh-panel-con...
http://www.grasshopper3d.com/forum/topics/vb-get-the-content-of-gh-...
http://www.grasshopper3d.com/forum/topics/python-panel-problem
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