IGH_ActiveObject
Base interface for all objects on the canvas that participate in solutions
Namespace: Grasshopper.Kernel
Assembly: Grasshopper (in Grasshopper.dll)
Syntax
public interface IGH_ActiveObject : IGH_DocumentObject
The IGH_ActiveObject type exposes the following members.
Properties
Name
Description
Public Property
Attributes
Gets or sets the attributes that are associated with this object. Only set custom attributes if you know what you are doing.
(Inherited from IGH_DocumentObject.)
Public Property
ComponentGuid
Returns a consistent ID for this object type. Every object must supply a unique and unchanging ID that is used to identify objects of the same type.
(Inherited from IGH_DocumentObject.)
Public Property
Exposure
Gets the exposure of this object in the Graphical User Interface.
(Inherited from IGH_DocumentObject.)
Public Property
Icon_24x24
The icon associated with this object.
(Inherited from IGH_DocumentObject.)
Public Property
Icon_24x24_Locked
The greyscale icon of this object.
(Inherited from IGH_DocumentObject.)
Public Property
IconDisplayMode
Gets the current display mode of the object.
(Inherited from IGH_DocumentObject.)
Public Property
IsDataProvider
Gets whether or not this object is capable of emitting data.
Public Property
Locked
Gets or sets the locked flag of this object. Locked objects are ignored during solutions.
Public Property
MutableNickName
Gets or sets a value that enables Nick name changes through the menu. The default is TRUE.
Public Property
Obsolete
Gets whether this object is Obsolete.
(Inherited from IGH_DocumentObject.)
Public Property
Phase
Gets the solution phase in which this object is currently stuck.
Public Property
ProcessorTime
Gets the most recent measured processor time.
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.
Methods
Name
Description
Public Method
AddedToDocument
This method will be called when an object is added to a document.
(Inherited from IGH_DocumentObject.)
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.
Public Method
AppendMenuItems
This function is called when a context menu is about to be displayed. Override it to set custom items.
(Inherited from IGH_DocumentObject.)
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
Public Method
ClearRuntimeMessages
Clear all message lists.
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
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.
Public Method
CreateAttributes
Create new default attributes for this object. You should only call this function when the Attributes() field is null.
(Inherited from IGH_DocumentObject.)
Public Method
DependsOn
Solve the inheritance relationship between this object and a potential parental object.
Public Method
DocumentContextChanged
This method will be called when the document that owns this object moves into a different context.
(Inherited from IGH_DocumentObject.)
Public Method
ExpirePreview
Call this function when you suspect that the preview has expired for this object. This will cause the display cache to be eradicated.
(Inherited from IGH_DocumentObject.)
Public Method
ExpireSolution
Call this function whenever you do something which expires the current solution. This will make sure all caches are erased, all downstream objects are expired and that the event is raised. The default implementation merely places a call to OnSolutionExpired(), override this function in derived classes to make sure you clear local data caches and expire downstream objects.
(Inherited from IGH_DocumentObject.)
Public Method
IsolateObject
Destroy all connections to other objects.
(Inherited from IGH_DocumentObject.)
Public Method
MovedBetweenDocuments
This method will be called when an object is moved from one document to another.
(Inherited from IGH_DocumentObject.)
Public Method
OnAttributesChanged
Raises the AttributesChanged event on the toplevel object.
(Inherited from IGH_DocumentObject.)
Public Method
OnDisplayExpired
Raises the DisplayExpired event on the toplevel object.
(Inherited from IGH_DocumentObject.)
Public Method
OnObjectChanged(GH_ObjectChangedEventArgs)
Raises the ObjectChanged event on the current (!not the top level!) object.
(Inherited from IGH_DocumentObject.)
Public Method
OnObjectChanged(GH_ObjectEventType)
Raises the ObjectChanged event on the current (!not the top level!) object.
(Inherited from IGH_DocumentObject.)
Public Method
OnObjectChanged(String)
Raises the ObjectChanged event on the current (!not the top level!) object.
(Inherited from IGH_DocumentObject.)
Public Method
OnObjectChanged(GH_ObjectEventType, Object)
Raises the ObjectChanged event on the current (!not the top level!) object.
(Inherited from IGH_DocumentObject.)
Public Method
OnObjectChanged(String, Object)
Raises the ObjectChanged event on the current (!not the top level!) object.
(Inherited from IGH_DocumentObject.)
Public Method
OnPingDocument
Raise the PingDocument Event on the toplevel object and try to find the document which owns this object.
(Inherited from IGH_DocumentObject.)
Public Method
OnPreviewExpired
Raises the PreviewExpired event on the toplevel object.
(Inherited from IGH_DocumentObject.)
Public Method
OnSolutionExpired
Raises the SolutionExpired event on the toplevel object.
(Inherited from IGH_DocumentObject.)
Public Method
RecordUndoEvent(GH_UndoRecord)
Record an entire undo record.
(Inherited from IGH_DocumentObject.)
Public Method
RecordUndoEvent(String)
Record a generic object change undo event.
(Inherited from IGH_DocumentObject.)
Public Method
RecordUndoEvent(String, IGH_UndoAction)
Record a specific object change undo event.
(Inherited from IGH_DocumentObject.)
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.
Public Method
RemovedFromDocument
This method will be called when an object is removed from a document.
(Inherited from IGH_DocumentObject.)
Public Method
RuntimeMessages
Gets the list of cached runtime messages that were recorded during solver-time processes.
Public Method
SDKCompliancy
Test whether this object is compliant with a given Rhino version.
Public Method
TriggerAutoSave.
Triggers the AutoSave function on the owner document with the object_changed flag.
(Inherited from IGH_DocumentObject.)
Public Method
TriggerAutoSave(GH_AutoSaveTrigger)
Triggers the AutoSave function on the owner document with a custom flag.
(Inherited from IGH_DocumentObject.)
Public Method
TriggerAutoSave(Guid)
Triggers the AutoSave function on the owner document with the object_changed flag.
(Inherited from IGH_DocumentObject.)
Public Method
TriggerAutoSave(GH_AutoSaveTrigger, Guid)
Triggers the AutoSave function on the owner document with a custom flag.
(Inherited from IGH_DocumentObject.)
Events
Name
Description
Public Event
AttributesChanged
Raised whenever the number or kind of attributes changes. This event is handled by GH_Documents who subsequently wipe their attribute caches.
(Inherited from IGH_DocumentObject.)
Public Event
DisplayExpired
Raised whenever the display (on the Canvas) of a certain object becomes invalid.
(Inherited from IGH_DocumentObject.)
Public Event
ObjectChanged
Raised whenever some property of the object changes that would affect remote instances.
(Inherited from IGH_DocumentObject.)
Public Event
PingDocument
Raised whenever an object needs to know which GH_Document it belongs to.
(Inherited from IGH_DocumentObject.)
Public Event
PreviewExpired
Raised whenever the display (in the Rhino viewports) of a certain object becomes invalid.
(Inherited from IGH_DocumentObject.)
Public Event
SolutionExpired
Raised whenever the solution of a certain object becomes invalid.
(Inherited from IGH_DocumentObject.)