amirrgoli
(Amirrgoli)
February 23, 2019, 5:04pm
1
hi…Like this component, it has select different option…
Is it possible to achieve that through GHpython after compiling into ghpy file?
tnx
chanley
(Chris Hanley)
February 23, 2019, 7:18pm
2
There is some discussion on context menus in a GHPython component here:
Hi!
Like this component, it has an Update button, and 3 option list if you Right-Click this.
Is it possible to achieve that through GHpython after compiling into ghpy file?
[3]
There is also some discussion on when to consider switching over to Visual studio to implement more sophisticated component options.
amirrgoli
(Amirrgoli)
February 23, 2019, 8:01pm
3
I know… But… I can’t found code for it…
tim.stark
(Tim Stark)
February 23, 2019, 8:07pm
4
Look the link posted above by @chanley .
The first answer of Guilio Piacentio already includes a gh file to download…
amirrgoli
(Amirrgoli)
February 23, 2019, 8:26pm
5
Tnx… But… This file didn’t work for my problem…
tim.stark
(Tim Stark)
February 23, 2019, 8:30pm
6
Ok, then maybe tell us what your problem is? What’s not working? Hard to help without information.
chanley
(Chris Hanley)
February 23, 2019, 8:31pm
7
From a development side, it seems that…while it may be possible to implement some more sophisticated custom ghpython component features, it may not be the most effective mechanism. If you need to add additional customization to your component, you may want to consider developing in visual studio/c#.
For a “simple” ghpython context menu, here is one example:
Thanks! I was missing the step of storing an attribute for each independent variable and doing something in the event handler to change the menu items from checked to unchecked. Your samples allowed me to get my first custom context menu working! It’s good enough for what I was hoping to accomplish. Thank you again for all of your help!
[GHPy_CompMenu_SDKMode]
Below is the code that worked for me. Note: Rhino 6, (6.7.18190.21071, 07/09/2018). GH python component in SDK mode.
from ghpyt…
amirrgoli
(Amirrgoli)
February 24, 2019, 5:51am
8
tnx a lot …can you help me for developing in visual studio/c#.? one sample?
amirrgoli
(Amirrgoli)
February 24, 2019, 5:53am
9
chanley:
a development side
a development side…open tab and choice option…