Instances

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

Fields

LoadOneByOne

#
public static bool LoadOneByOne

Properties

ActiveCanvas

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

ActiveDocument

#
public static GH_Document ActiveDocument { get; }

ActiveRhinoDoc

#
public static RhinoDoc ActiveRhinoDoc { get; }

AutoHideBanner

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

AutoShowBanner

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

BakeIcon24

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

ComponentServer

#
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.
public static GH_ComponentServer ComponentServer { get; }

CursorServer

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

DocumentAssociationServer

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

DocumentEditor

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

DocumentServer

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

EtoDocumentEditor

#
public static Window EtoDocumentEditor { get; }

GrasshopperPluginId

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

IsComponentServer

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

IsCursorServer

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

IsDocumentAssociationServer

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

IsDocumentEditor

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

IsDocumentEditorOnTopOfViewports

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

IsDocumentServer

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

IsMarkovChain

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

IsMruServer

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

IsRemotePanelVisible

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

MarkovChain

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

MruServer

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

RcpPanel

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

RunningHeadless

#
public static bool RunningHeadless { get; }

Settings

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

Methods

DocumentEditorFadeIn

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

DocumentEditorFadeOut

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

EnforceInvariantCulture

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

HideRemotePanel

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

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.
public static object Interop()

InvalidateCanvas

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

MyTypes

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

RedrawAll

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

RedrawCanvas

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

ReloadMemoryAssemblies

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

ShowRemotePanel

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

UnloadAllObjects

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

Events

CanvasCreated

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

CanvasDestroyed

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