algorithmic modeling for Rhino
To get the value to you need the .UserText property. To set new values, use .SetUserText.
Currently setting new values will change all the panels. You will need to add a few more lines of code if you wish to set unique text to each panel. Also, because the script picked up all the panels on the canvas (including the ones connected to the Python outputs), I made an input that contains a list of the panel NickNames you want to operate on. This helped, but may not be what you want.
See attached.
/SPM
Hi Stephen P.Maher
Thank you very much for your answer,The perfect solution to my first question.You can solve the second problem?
Thanks again.
/NARUTO
Naruto,
Can you clarify what you're looking for exactly? (An image or diagram might be helpful.) The definition I attached earlier allows the user to replace the Panel's text with another using .SetUserText. Or are you specifically curious how .SetValue works?
/SPM
Yes,I just specifically curious how .SetValue works
What are you trying to do exactly? SetValue may not be what you want.
Whoops, here's the correct file.
Can this work with a "list" as well? For example, instead of one value per panel, could you pass in a list of values, and have them written/stored to one panel as a list?
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
© 2024 Created by Scott Davidson. Powered by