Rhino Remote Panel with Python

I am getting started with RHINO plug in development using Python, and am wondering if there is a way to create a new remote panel for the plug-in. I want to be able to control a few inputs using the panel.

Thanks in advance for the help!

Hi @apoorvgoyal,

What is a “remote panel”? What would the panel do?

– Dale

Sorry, I didn’t put in too many details. I meant to say a Remote Control Panel, when I said Remote Panel - Similar to the GH Remote Control Panel.

Since posting this question I realized that for the task I am trying to achieve (explained below), I essentially need to open a RCP from GH (which i am able to do), and publish few items from the GH script to the panel so that those components (eg. slider/button) can be directly controlled from RHINO.

What am I trying to achieve/do:
I am making a RHINO toolbar that will help automate few GH scripts without the necessity to interact with GH. The idea here is to have the capabilities of GH available to those who are not versed with the tool and its plugins. But to completely tap into the parametric nature of GH, I need to publish few items into the GH Remote Control Panel.

I have seen examples of VB scripts that can do this, like this post : http://www.grasshopper3d.com/forum/topics/activate-remote-pannel-control-in-vb?id=2985220%3ATopic%3A1011963&page=2

but I am unable to re-create this in Python due to lack of information in Python ( I am still a newbie). Any help/documentation regarding this would be helpful!

Thanks Dale!

Hi @apoorvgoyal,

I can translate the VB script linked in the forum post for you, but I have a question. How are you exactly planning on creating Python plug-ins? What’s the goal here?

If you are just willing to use the functionality, then there’s a file that you can open.
If you want to create a (compiled) plug-in, then VB is better than Python because you cannot really compile Python. I am a little confused, but willing to help,

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

Giulio,

Thanks much for offering to help. A python file would be great so that I
can also learn some of the translation functionality.
As you mentioned, I could use the VB component and do the work, but I just
want to A, have the code all in one language. B learn advanced python
scripting for RHINO.

Right now, I am just on a RHINO Toolbar and haven’t compiled it into a
plugin. But I did try compiling the python files with the RHINO 5 compiler
and that kind of worked.

Hi there,

I translated all three examples for you and anyone else to Python.

There’s also a link to this discussion over there on the Grasshopper forum, now.

RCPParameter_with_py.gh (12.9 KB)

Giulio


Giulio Piacentino
for Robert McNeel & Associates
giulio@mcneel.com

4 Likes

Giulio,

Thank you very much for this! This is super helpful!
Just out of curiosity, is there some source of documentation that I can
refer for this?

Yes,

Grasshopper SDK:
http://developer.rhino3d.com/wip/api/grasshopper/html/723c01da-9986-4db2-8f53-6f3a7494df75.htm

but mostly is really just Python language with a few Grasshopper SDK methods.

Hi there,

I wanted to do something similar to what you are doing with this Python component. I want to activate the Remote Control Panel but remove all of the other panels I have on Rhino and dock the Remote Control Panel to the right. Is that possible? I could run the script and open the RCP, but it opens as a floating window, which is not what I want (see images).

Thanks in advance,

Juan


Hello Giulio, if I modify the text within the control panel, how can I see the result within Grasshopper?