IGH_Component
Base interface for all GH_Component types. Do not implement this interface from scratch, inherit from GH_Component instead.
Namespace: Grasshopper.Kernel
Assembly: Grasshopper (in Grasshopper.dll)
Syntax
public interface IGH_Component : IGH_ActiveObject, IGH_PreviewObject, IGH_BakeAwareObject
The IGH_Component type exposes the following members.
Properties
Name
Description
Public Property
ClippingBox
Gets the clipping box for this object. The clipping box is typically the union of the boundingboxes of all the geometry that is drawn by this object.
(Inherited from IGH_PreviewObject.)
Public Property
Hidden
Gets or sets a value indicating whether or not this object is currently drawing preview flags.
(Inherited from IGH_PreviewObject.)
Public Property
InConstructor
Gets the constructor flag for this instance. If InConstructor = True, it means the component is still registering parameters and the layout is not yet complete.
Public Property
IsBakeCapable
Gets a value indicating whether or not the object can potentially Bake data in its current state.
(Inherited from IGH_BakeAwareObject.)
Public Property
IsDataProvider
Gets whether or not this object is capable of emitting data.
(Inherited from IGH_ActiveObject.)
Public Property
IsPreviewCapable
Gets a value indicating whether or not this object (in its current state) can draw geometric previews at all.
(Inherited from IGH_PreviewObject.)
Public Property
IsValidMasterParameterIndex
Gets whether the MasterParameterIndex property identifies a valid parameter.
Public Property
Locked
Gets or sets the locked flag of this object. Locked objects are ignored during solutions.
(Inherited from IGH_ActiveObject.)
Public Property
MasterParameterIndex
Gets or sets the master parameter index override. Negative indices or indices larger than or equal to the input parameter count will be ignored and regular master parameter detection will kick in.
Public Property
Message
Gets or sets a custom message to be displayed underneath the component.
Public Property
MutableNickName
Gets or sets a value that enables Nick name changes through the menu. The default is TRUE.
(Inherited from IGH_ActiveObject.)
Public Property
Params
Gets the Params object that managed input and output parameters.
Public Property
Phase
Gets the solution phase in which this object is currently stuck.
(Inherited from IGH_ActiveObject.)
Public Property
ProcessorTime
Gets the most recent measured processor time.
(Inherited from IGH_ActiveObject.)
Public Property
RunCount
Gets a value indicating how many times the SolveInstance method was called on this component during the last solution. This property will return -1 if no valid runcount is available.
Public Property
RuntimeMessageLevel
Gets the worst-case level of all messages. I.e. if only warnings have been recorded, the level will be ::warning. If even a single error exists, the level will be ::error.
(Inherited from IGH_ActiveObject.)
Methods
Name
Description
Public Method
AddRuntimeMessage
Add a new message to this object. Valid message type flags are Warning and Error. If the Message string is empty or zero-length no message is added.
(Inherited from IGH_ActiveObject.)
Public Method
BakeGeometry(RhinoDoc, List.Guid.)
Bake all the goemetry in this object in the given Rhino document.
(Inherited from IGH_BakeAwareObject.)
Public Method
BakeGeometry(RhinoDoc, ObjectAttributes, List.Guid.)
Bake all the goemetry in this object in the given Rhino document.
(Inherited from IGH_BakeAwareObject.)
Public Method
ClearData
This function is called whenever the object needs to clear all solution data. This usually amounts to wiping volatile caches and messages. This function will not affect any other objects, but it will set the Phase flag to Blank
(Inherited from IGH_ActiveObject.)
Public Method
ClearRuntimeMessages
Clear all message lists.
(Inherited from IGH_ActiveObject.)
Public Method
CollectData
This function is called whenever the object is required to collect all data. Either from Persistent records, from source params or whatever. This step is only performed if the phase flag is Blank or Failed. Upon completion, the phase flag will be set to Collected
(Inherited from IGH_ActiveObject.)
Public Method
ComputeData
This function is called whenever the object is required to generate new data. This step is only performed by some objects and only when the Phase flag is Collected. Upon completion, the Phase will be Computed. If this object throws exceptions, it is the responsibility of the caller to set the Phase flag to Failed.
(Inherited from IGH_ActiveObject.)
Public Method
DependsOn
Solve the inheritance relationship between this object and a potential parental object.
(Inherited from IGH_ActiveObject.)
Public Method
DrawViewportMeshes
Implement this function to draw all shaded meshes. If the viewport does not support shading, this function will not be called.
(Inherited from IGH_PreviewObject.)
Public Method
DrawViewportWires
Implement this function to draw all wire and point geometry previews.
(Inherited from IGH_PreviewObject.)
Public Method
RegisterRemoteIDs
If this object depends on Rhino Objects, you must register the UUIDs of those objects. Failure to do so will result in faulty event handling.
(Inherited from IGH_ActiveObject.)
Public Method
RuntimeMessages
Gets the list of cached runtime messages that were recorded during solver-time processes.
(Inherited from IGH_ActiveObject.)
Public Method
SDKCompliancy
Test whether this object is compliant with a given Rhino version.
(Inherited from IGH_ActiveObject.)