You can use/script the Fullscreen command. Call with -Fullscreen to provide additional settings.
Edit: Here’s a recent GhPython example:
"""
Set up Rhino and Grasshopper for a fullscreen demo (e.g. show Remote Control
Panel, turn off viewport titles/lock viewport, set unit, hide Grasshopper).
Inputs:
Setup: Run the component {item,bool}
Geometry: Geometry to zoom select to {item,geometry}
Outputs:
Remarks:
Author: Anders Holden Deleuran (BIG CPH)
Rhino: 8.24.25251.22001
Version: 250926
"""
ghenv.Component.Name = "SetupRhinoGrasshopper"
ghenv.Component.NickName = "SRG"
import Rhino as rc
import Grasshopper as gh
from System.Drawing import Color
# Get Rhino appearence setting, active viewport and Grasshopper plugin
ast = rc.ApplicationSettings.AppearanceSettings
atv = rc.RhinoDoc.ActiveDoc.Views.ActiveView
ghp = rc.RhinoApp.GetPlugInObject("Grasshopper")
# Set up Rhino/Grasshopper for live demo
if Setup:
# Go fullscreen
if not rc.RhinoApp.InFullScreen():
rc.RhinoApp.RunScript("FullScreen",False)
# Set top view
rc.RhinoApp.RunScript("SetView World Top",False)
# Show Grasshopper remote control panel
if not gh.Instances.IsRemotePanelVisible:
gh.Instances.ShowRemotePanel()
# Turn off viewport titles/tabs and set background color
ast.ShowViewportTitles = False
ast.ViewportTabsVisibleAtStart = False
ast.ViewportBackgroundColor = Color.White
# Set active viewport properties
atv.Maximized = True
atv.ActiveViewport.ZoomBoundingBox(Geometry.GetBoundingBox(True))
atv.ActiveViewport.ConstructionGridVisible = False
atv.ActiveViewport.ConstructionAxesVisible = False
atv.ActiveViewport.WorldAxesVisible = False
atv.ActiveViewport.LockedProjection = True
# Set unit to mm and tolerance
rc.RhinoDoc.ActiveDoc.ModelUnitSystem = rc.UnitSystem.Millimeters
rc.RhinoDoc.ActiveDoc.ModelAbsoluteTolerance = 0.001
# Hide Grasshopper window
ghp.HideEditor()
# Turn things off again
else:
# Return from fullscreen
if rc.RhinoApp.InFullScreen():
rc.RhinoApp.RunScript("FullScreen",False)
"""
# Hide Grasshopper remote control panel
if gh.Instances.IsRemotePanelVisible:
gh.Instances.HideRemotePanel()"""
# Turn on viewport titles
ast.ShowViewportTitles = True
# Set active viewport properties
atv.ActiveViewport.LockedProjection = False
#atv.ActiveViewport.ConstructionGridVisible = True
#atv.ActiveViewport.ConstructionAxesVisible = True
#atv.ActiveViewport.WorldAxesVisible = True
I would still love to have a more explicit control of the individual toolbars and panels. Panels I can hide but I struggle with toolbars.
This is the state of my experimentation.
I get a GroupCount of 0 (Rhino 8) so I can’t get any groups, and I can’t hide the individual toolbars.
import Rhino
import scriptcontext as sc
import rhinoscriptsyntax as rs
sc.doc = Rhino.RhinoDoc.ActiveDoc
def HideAllToolbars():
rs.EnableRedraw(False)
for toolbar_file in Rhino.RhinoApp.ToolbarFiles:
print(toolbar_file.Name)
print(toolbar_file.GroupCount)
print(toolbar_file.ToolbarCount)
for i in range(toolbar_file.ToolbarCount):
toolbar = toolbar_file.GetToolbar(i)
print(toolbar.Name)
#HOW TO HIDE!
HideAllToolbars()
for panel in Rhino.UI.Panels.GetOpenPanelIds():
try:
Rhino.UI.Panels.ClosePanel(panel)
except:
pass
sc.doc = ghdoc