General Settings modification

Hi everyone!

I just want to share with you a Python script I did to change the general settings of the GH canvas, such as the preview mode, number of decimals, etc. I hope you find it useful!

import Grasshopper as gh

#####################################################
################# GENERAL SETTINGS ##################
#####################################################


# Preview mode of the Grasshopper document to "Shaded".
ghenv.Component.OnPingDocument().PreviewMode = gh.Kernel.GH_PreviewMode.Shaded

# Deactivate the only preview selected objects.
ghenv.Component.OnPingDocument().PreviewFilter =gh.Kernel.GH_PreviewFilter(0)

# Show mesh edges in the preview to "True".
gh.CentralSettings.PreviewMeshEdges=True

# Activate Pi as Special character.
gh.CentralSettings.FormatMultiplesOfPi=True

# Activate special characters to numbers.
gh.CentralSettings.FormatMultiplesOfOne=True

# Sets the number of decimal digits.
gh.CentralSettings.FormatDecimalDigits=10

# Sets the number of digits to show in scientific notation.
gh.CentralSettings.FormatENotationDigits=10

# Sets the lower limit of the range of numbers to be displayed in scientific notation.
gh.CentralSettings.FormatENotationLowerLimit=-12

# Sets the upper limit of the range of numbers to be displayed in scientific notation.
gh.CentralSettings.FormatENotationUpperLimit=12

# Deactivate the Ribbon Icon Mode.
gh.CentralSettings.RibbonDrawTabIcons=False

# Deactivate the Drawing Icon.
gh.CentralSettings.CanvasObjectIcons=False

No need for neither inputs nor outputs.

Have a nice day!