Instances

public sealed class Instances
Provides access to a bunch of global instances and variables.

Fields

LoadOneByOne

#
public static bool LoadOneByOne

Properties

ActiveCanvas

#
public static GH_Canvas ActiveCanvas { get; }
Gets the currently active Grasshopper canvas (if any)

ActiveDocument

#
public static GH_Document ActiveDocument { get; }

ActiveRhinoDoc

#
public static RhinoDoc ActiveRhinoDoc { get; }

AutoHideBanner

#
public static bool AutoHideBanner { get; set; }
Gets or sets a value indicating whether the banner ought to be hidden automatically when loading completes.

AutoShowBanner

#
public static bool AutoShowBanner { get; set; }
Gets or sets a value indicating whether or not the banner will be displayed during the ComponentServer Loading process.

BakeIcon24

#
[EditorBrowsable(EditorBrowsableState.Never)] public static Bitmap BakeIcon24 { get; }
Gets the 24x24 pixel bake icon.

ComponentServer

#
public static GH_ComponentServer ComponentServer { get; }
Gets the ComponentServer instance cached by the Instance Server. The ComponentServer will be instantiated the first time this property accessed. This is a rather involved process during which the Grasshopper Banner will be displayed.

CursorServer

#
public static GH_CursorServer CursorServer { get; }
Gets the CursorServer instance cached by the Instance Server. The CursorServer will be instantiated the first time this property is accessed.

DocumentAssociationServer

#
public static GH_DocumentAssociations DocumentAssociationServer { get; }
Gets the Document Association Server instance cached by the Instance Server. The Document Association Server will be instantiated the first time this property accessed.

DocumentEditor

#
public static GH_DocumentEditor DocumentEditor { get; }
Gets the DocumentEditor of Grasshopper.

DocumentServer

#
public static GH_DocumentServer DocumentServer { get; }
Gets the DocumentServer instance cached by the Instance Server. The DocumentServer will be instantiated the first time this property accessed.

EtoDocumentEditor

#
public static Window EtoDocumentEditor { get; }

GrasshopperPluginId

#
public static Guid GrasshopperPluginId { get; }
Gets the ID of the Grasshopper Plugin.

IsComponentServer

#
public static bool IsComponentServer { get; }
Gets whether the Component server has been set.

IsCursorServer

#
public static bool IsCursorServer { get; }
Gets whether the Cursor server has been set.

IsDocumentAssociationServer

#
public static bool IsDocumentAssociationServer { get; }
Gets whether the Document Association server has been set.

IsDocumentEditor

#
public static bool IsDocumentEditor { get; }
Gets whether the Document Editor has been set.

IsDocumentEditorOnTopOfViewports

#
public static bool IsDocumentEditorOnTopOfViewports { get; }
Gets whether the Grasshopper document editor (or any of its child forms) is obscuring a significant part of the Rhino viewports.

IsDocumentServer

#
public static bool IsDocumentServer { get; }
Gets whether the Document server has been set.

IsMarkovChain

#
public static bool IsMarkovChain { get; }
Gets a value indicating whether or not the MarkovChain has already been initialized.

IsMruServer

#
public static bool IsMruServer { get; }
Gets a value indicating whether or not the MRU server has been initialized.

IsRemotePanelVisible

#
public static bool IsRemotePanelVisible { get; }
Gets whether the Remote Control Panel is currently visible.

MarkovChain

#
public static GH_MarkovChain MarkovChain { get; }
Gets the MarkovChain instance cached by the Instance Server. The Markov chain will be instantiated if it hasn't been already.

MruServer

#
public static GH_MRU_Server MruServer { get; }
Gets the MRU_Server instance cached by the Instance Server. The MRU_Server will be instantiated the first time this property accessed.

RcpPanel

#
public static RemoteControlPanel RcpPanel { get; }
Gets the active document RCP panel instance.

RunningHeadless

#
public static bool RunningHeadless { get; }

Settings

#
public static GH_SettingsServer Settings { get; }
Represents the default settings database. Feel free to add your own settings to this database.

Methods

DocumentEditorFadeIn

#
public static void DocumentEditorFadeIn()
Calls the FadeIn() method on the DocumentEditor if it exists.

DocumentEditorFadeOut

#
public static void DocumentEditorFadeOut()
Calls the FadeOut() method on the DocumentEditor if it exists.

EnforceInvariantCulture

#
public static void EnforceInvariantCulture()
If the Setting "EnforceInvariantCulture" is set to False, this function does nothing

HideRemotePanel

#
public static bool HideRemotePanel()
Hides the remote control panel.

Interop

#
public static object Interop()
Gets the Grasshopper 1.0 interop object, i.e. an instance of GrasshopperPlugin.GrasshopperInterop as exposed via the GetInteropObject() method on the Grasshopper 1.0 plugin object.

InvalidateCanvas

#
public static void InvalidateCanvas()
Invalidates the currently active Grasshopper Canvas, causing a redraw sometime in the foreseeable future.

MyTypes

#
public static Type[] MyTypes()
Get all the type identifiers that are part of the Grasshopper assembly.
An array of Type objects.

RedrawAll

#
public static void RedrawAll()
Forces a redraw of both the active canvas and the Rhino viewports on the active document.

RedrawCanvas

#
public static void RedrawCanvas()
Forces a redraw of the currently active Grasshopper Canvas.

ReloadMemoryAssemblies

#
public static List<string> ReloadMemoryAssemblies()
Unload and attempt to reload all plugin assemblies that were loaded via the COFF pipeline.
Collection of load messages.

ShowRemotePanel

#
public static bool ShowRemotePanel()
Shows the remote control panel.

UnloadAllObjects

#
public static void UnloadAllObjects()
Clears and unloads all cached objects. This function is called by the _GrasshopperUnloadPlugin command. Please don't use it.

Events

CanvasCreated

#
public static event Instances.CanvasCreatedEventHandler CanvasCreated
Raised when the main canvas is created.

CanvasDestroyed

#
public static event Instances.CanvasDestroyedEventHandler CanvasDestroyed
Raised when the main canvas is destroyed.