How to close all panels with a command

Hi,
Why no command for this?
I just want a quick way to hide and then re-open all my set panels.
Now it’s 2 mouse clicks to close all my panels,
I can then use Layer command to get them back on.
I think there should be panel commands but I couldn’t find any in help.

I did read the topics listed here but fullscreen doesn’t work because I only want to hide the panels and not my left associated toolbars and I just want to bring them back I have them docked on the right side.
Maybe there is a vb or python script?

You can write a little alias with the -fullscreen command.
See options for -fullscreen in rhino help.

For toolbars, I believe

-toolbar
_enter
[nameoftoolbar]
_enter
_show

Or something similar should work.

Hi,
Thanks but I’m aware of these workarounds as I hinted at in my posting.
I find them inadequate because…
Fullscreen doesn’t allow or have an option for the left hand menus to show. Maybe it’s there buried in the settings?
The toolbar macro would only work if know which toolbar I want to hide. Depending on what I am doing I might have environments open or not or the mesh tools open or not, the above macro you posted doesn’t work unless you always have the same toolbars in the panel. If you select other toolbars not in the macro the toolbars macro won’t close the panels only the toolbar on the panel.

A simple command added by rma of close panels open panels and maybe some python or vbscript methods to iron this out surely this can’t be too hard to add?
The other only way I can think is to use Vb or a long macro that closes all panel toolbars.

RM

Hi RM - this is on the pile from previous - I added a ‘reinforcement’ link to this thread:

https://mcneel.myjetbrains.com/youtrack/issue/RH-29598

-Pascal

Thanks Pascal
RM

Hi, I’d like to second this request.

the suggested workaround of using the Fullscreen command does not work well when the Rhino window is not maximized: for example when working with Rhino and Grasshopper, the two windows are usually kept side by side, which decreases the space available for the Rhino viewport, so having the possibility of toggling all the panels with a simple shortcut would be even more useful.

On the other hand, when working in this way, the fullscreen maximizes the Rhino window, which then gets partially hidden by the Grasshopper window, so it’s not very useful.

Thanks!
Marco

Would the following script help?

CloseAllFloatingTBs.py (732 Bytes)

Note it does not toggle, just closes any floating toolbars.

Thank you Mitch,

Unfortunately it does not, as it closes the floating toolbars while I’d like to close the docked panels (Layers, Properties /Render / Materials etc.)

Thanks anyway :slight_smile:

You can toggle docked panels with a macro:

'-_Properties _Visible _Toggle _Enter
'-_Layer _Visible _Toggle _Enter

etc…

1 Like

Are there undocked panels that you want to keep open, or could it just close all panels?

I don’t have any undocked panel, just a set of panels (Layers, Properties, etc) all docked on the right into a single element (each panel has a tab)

Thank you for the suggestion Wip!

I used that to create a script that solves almost everything (see attached file), and allows to define and maintain custom order for the panels.

I’m just missing two things:
1 - Is it possible to toggle the visibility of the Grasshopper Remote Control Panel? I haven’t found a corresponding command
2 - When the panels are shown or hidden, there is a bit of screen flickering: is it possible to just disable the screen refresh until all the panels have been hidden/shown (in the same way EnableRedraw() works for the viewport)?

Apart from that, for now it is a nice workaround, thanks again for the help!

TogglePanels.py (1.1 KB)

Here’s my RhinoCommon-based experimental version. It handles the Grasshopper panel (I found the ID). Modify the MyPanels() list in the script to suit your needs by choosing indices in order from the master list of all panels.

If at least one panel is open the first time you run a script in a session, it will close all the panels in the list. Otherwise it will open them all. It stores the visible value in sticky, so the next time you run it it will toggle. It tries to re-dock previously docked panels… :stuck_out_tongue_closed_eyes:

Edit: changed the script name to avoid confusion - hmm, Discourse will not let me do that… Really odd, I changed the file name, but every time I upload, it changes it back…

image

TogglePanels.py (2.7 KB)

Have fun…

1 Like

Hi Mitch,
Thanks for the script.
I have all my panels docked before I run it…
After running it leaves the sun and library tabs open and docked on the right side
Toggling brings back all the docked Panels (out of order) but also panels I never had docked/open which are now open and floating. See image.

Yep it was set up for Marco and set specifically with his list of panels… Which are apparently always the same. You can adjust it to suit your preferences. It does not attempt to see what you have docked/open because that could be none.

How would you like it to work?

Thank you Mitch, that’s as perfect as it can be!

Hi Mitch,
I didn’t realize you were on a tangent to my thread with Marco.:slightly_smiling_face:
I glanced at your post and read closes all doc panels but didn’t realize I had to choose options in the py-script. I did choose the options and it works great, I see the reason for the floating panels now that I looked at your script.

I don’t know if it’s possible ideally it would be nice to not have to choose any options so that any panels that are docked or floating all close with one click and open where they were with one click.

Great work as usual thanks for sharing,
RM

Hi helvetosur
Thanks for the script.
but the boxedit panel not working

Yes, the BoxEdit panel id does not seem to be exposed in the RhinoCommon API documentation. So I don’t know where to find the ID. If anyone has the panel ID, I can add it to the script.

Hi Mitch -
For what it’s worth - the _BoxEdit command has a visibility option that can be toggled or set explicitly.
-wim

Thanks for your quick reply