IParameter

References
Base interface for parameters. Never directly implement this interface, always inherit from AbstractParameter, Parameter, or Parameter<T> instead.

Properties

Access

#
Gets the access for this parameter, i.e. whether it treats data as items, lists or trees.
Access Access { get; }

AccessVariability

#
Gets or sets the variability allowance of the access level. If this variability is anything other than None, the parameter will provide menu UI for changing its access state.
AccessVariability AccessVariability { get; set; }

Activity

Gets or sets the active state of this object. Note that this property is meaningless for certain types of object.
ObjectActivity Activity { get; set; }
inherited fromIDocumentObject

Attributes

Gets or sets the attributes for this object. It is possible that an object does not have attibutes. Only objects that are drawn on the canvas are guaranteed to have attributes.
IAttributes Attributes { get; }
inherited fromIDocumentObject

ChildrenObjects

Gets all immediate child objects that belong to the current object. It is possible that an object does not have any children, and it is possible that a child object has children of its own.
IEnumerable<IDocumentObject> ChildrenObjects { get; }
inherited fromIDocumentObject

ColourOverride

#
Gets or sets the colour override for the display of this object.
Colour ColourOverride { get; set; }

Connectivity

Gets the topological description of this object. The topology is not updated automatically, so be sure to get a fresh instance every time you need it.
IObjectConnectivity Connectivity { get; }
inherited fromIDocumentObject

CustomValues

Gets a collection of keyed values which can be used to store custom data which will survive (de)serialisation.
KeyedValues CustomValues { get; }
inherited fromIDocumentObject

Display

Gets or sets the display state of this object. Note that this property is meaningless for certain types of object.
ObjectDisplay Display { get; set; }
inherited fromIDocumentObject

DisplayCapable

Gets whether this object makes allowance for 3D viewport displays.
bool DisplayCapable { get; }
inherited fromIDocumentObject

DisplayName

Gets the display name of this object. Often the DisplayName is identical to the UserName, but there could be more complicated algorithms involved.
string DisplayName { get; }
inherited fromIDocumentObject

DisplayStyle

Gets or sets the display style to use for the geometric data inside this object. Note that this property is meaningless for certain types of object.
ObjectDisplayStyle DisplayStyle { get; set; }
inherited fromIDocumentObject

Document

Gets the document this object belongs to. It is possible an object does not belong to any document. Do not assign or remove document associations unless you know exactly what you are doing.
Document Document { get; set; }
inherited fromIDocumentObject

EntireFamily

Enumerates over all objects in the hierarchy this object is part of. This enumeration starts at the root object and then continues over all children and grandchildren in a breadth-first fashion.
IEnumerable<IDocumentObject> EntireFamily { get; }
inherited fromIDocumentObject

FallbackName

#
Gets or sets a fallback name to be used as DisplayName in case the UserName is null or empty.
string FallbackName { get; set; }

FoundingObject

Gets the root or founding object in the object hierarchy. If the current object does not have a parent, it is a founding object.
IDocumentObject FoundingObject { get; }
inherited fromIDocumentObject

HardMetaData

#
Gets or sets the primary meta data to assign to all values passing through this parameter. Primary meta data is always assigned and may overwrite existing meta data with the same keys.
MetaData HardMetaData { get; set; }

Icon

Gets the icon associated with this object.
IIcon Icon { get; }
inherited fromIDocumentObject

Inputs

#
Gets the input parameters. This list only includes parameters that are connected through wires, it does not include globals this parameter depends on.
Connections Inputs { get; }

InstanceId

Gets or sets the instance Id for this object. The instance Id should be different for every instance of every type. Do *not* assign this Id unless you know exactly what you are doing.
Guid InstanceId { get; set; }
inherited fromIDocumentObject

Kind

#
Gets the parameter station (in life). Input, output, floating or other.
Kind Kind { get; }

ModifierIcons

#
Gets an array of all the mode icons currently in effect in this parameter.
ModifierIcons ModifierIcons { get; }

Modifiers

#
Gets or sets the modifiers associated with this parameter.
Modifiers Modifiers { get; set; }

Nomen

Gets the user friendly description of this object.
Nomen Nomen { get; }
inherited fromIDocumentObject

Obsolete

Gets whether this object is considered obsolete.
bool Obsolete { get; }
inherited fromIDocumentObject

Outputs

#
Gets the output parameters. This list only includes parameters that are connected through wires, it does not include objects that in some other way depend on this parameter.
Connections Outputs { get; }

ParentObject

Gets or sets the parent object that owns this object. Top-level objects do not have parents. Do not assign or remove parents unless you know exactly what you are doing.
IDocumentObject ParentObject { get; set; }
inherited fromIDocumentObject

PersistentDataWeak

#
Gets the persistent data in a weakly typed form.
ITree PersistentDataWeak { get; set; }

Phase

Gets the current solution phase of this object.
Phase Phase { get; }
inherited fromIDocumentObject

PostProcessInputTrees

#
Assign this method if you wish to process the trees harvested from source parameters before they are converted into a single, type compatible tree. You almost never need to assign this, it's *super* exotic.

Do note that any type conversions that occur here will not be included in the conversion record.

Also note that this property must be assigned every time as it cannot be (de)serialised.

Action<ITree[]> PostProcessInputTrees { get; set; }

PresetsWeak

#
Gets the presets in a weakly typed form.
IPresets PresetsWeak { get; }

ProgressPercentage

Gets an object progress percentage while the object is computing. The Grasshopper UI may or may not choose to display this percentage somewhere.
int ProgressPercentage { get; }
inherited fromIDocumentObject

Relevance

Gets or sets the auxiliary state of this object. Auxiliary objects are drawn in an inconspicuous way as they are considered in-between logic. Note that this property is meaningless for certain types of object.
ObjectRelevance Relevance { get; set; }
inherited fromIDocumentObject

Requirement

#
Gets or sets the data requirement for this parameter. Requirement typically only make sense as component inputs, but the property exists on all parameters.
Requirement Requirement { get; set; }

Selected

Gets the main yes/no state from the SelectionState.
bool Selected { get; }
inherited fromIDocumentObject

Selection

Gets or sets the selected state of this object. Note that the selected setting of secondary objects is inherited from the parent.
ObjectSelection Selection { get; set; }
inherited fromIDocumentObject

SiblingObjects

Gets all sibling objects in the object family tree.
IEnumerable<IDocumentObject> SiblingObjects { get; }
inherited fromIDocumentObject

SoftMetaData

#
Gets or sets the secondary meta data to assign to all values passing through this parameter. Secondary meta data is only assigned when it won't overwrite existing meta data with the same keys.
MetaData SoftMetaData { get; set; }

State

Gets the current solution state of this object.
ObjectSolutionState State { get; }
inherited fromIDocumentObject

TypeAssistantWeak

#
Gets the weakly typed type assistant (if any) for the data inside this parameter.
ITypeAssistant TypeAssistantWeak { get; }

TypeFlavour

#
Gets the flavour of the type this parameter contains.
TypeFlavour TypeFlavour { get; }

UserName

Gets the user specified name of this object.
string UserName { get; set; }
inherited fromIDocumentObject

Methods

AddUndoRecord

Add a custom undo record for this object.
void AddUndoRecord(
Record
record
Undo record to add.
)
inherited fromIDocumentObject
Id of undo record.

AddUndoRecord

Add a single action undo record for this object.
void AddUndoRecord(
name,
Name of undo record.
action
Specific action to undo.
)
inherited fromIDocumentObject
Id of undo record.

AppendToInputPanel

Append the object specific items to an existing input panel.
void AppendToInputPanel()
inherited fromIDocumentObject

ClearModifierIcons

#
Clear the modifier icon caches. Call this method if the icons change without a new solution being involved.
[EditorBrowsable(EditorBrowsableState.Never)] void ClearModifierIcons()

Compute

Compute a new solution for this object, or return a completed solution if one is available.
SolutionData Compute(
solution,
Document solution info.
stack
Call stack leading up to this call.
)
inherited fromIDocumentObject
Result of computation.

DisplayBounds

Gets the bounds of the geometry this object might display.
BoundingBox DisplayBounds()
inherited fromIDocumentObject

DisplayFaces

Draw the shaded faces for this object.
void DisplayFaces(
pipeline,
guises,
extents
)
inherited fromIDocumentObject

DisplayWires

Draw the wires for this object.
void DisplayWires(
pipeline,
guises,
extents
)
inherited fromIDocumentObject

Expire

Expire this object and all objects that depend on it. This will request-cancel any running solutions inside whatever document contains this object.
void Expire()
inherited fromIDocumentObject

ExpireReferences

Expire all references which match a validator method.
bool ExpireReferences(
filter,
Validator method. Only references which pass this filter need to be taken into account.
document,
Rhino document to search.
retainReferences
If true, missing references ought to be retained. If false, missing refs need to revert to nulls.
)
inherited fromIReferenceAware
True if the object state was modified due to a reference change.

GetCreationInfo

Gets information about who created this component and when.
bool GetCreationInfo(
out string
userName,
Name of creator.
time
Time of creation in UTC coordinates.
)
inherited fromIDocumentObject
True if the creation data was available.

GetModificationInfo

Gets information about who last modified this component and when.
bool GetModificationInfo(
out string
userName,
Name of modifier.
time
Time of modification in UTC coordinates.
)
inherited fromIDocumentObject
True if the modification data was available.

ModifyIcon

Override the icon for this object. Use this judiciously.
void ModifyIcon(
newIcon,
New icon to assign, or null to revert to the default icon.
overrideExtrinsicIcon = true
If true, the permanent extrinsic icon will be overwritten. If false, the temporary intrinsic icon will be overwritten.
)
inherited fromIDocumentObject

ModifyNameAndInfo

Programmatically modify the nickname, name and/or info strings on the Nomen.
void ModifyNameAndInfo(
name = null,
New name if not null.
info = null
New info if not null.
)
inherited fromIDocumentObject

OnDisplayChanged

void OnDisplayChanged()
inherited fromIDocumentObject

OnLayoutChanged

void OnLayoutChanged()
inherited fromIDocumentObject

OverrideAttributes

Assign new attributes to this object. Not all attributes may be accepted, it depends on the implementation.
bool OverrideAttributes(
attributes
New attributes to assign. Assigning null will revert to default attributes.
)
inherited fromIDocumentObject
True if attributes were accepted.

RequestAutoSave

Request an autosave.
AutoSaveResult RequestAutoSave(
reason,
Autosave reason.
autosaveId
Autosave Id. Consecutive requests with identical Ids are ignored.
)
inherited fromIDocumentObject

RequestAutoSave

Request an autosave using the instance ID of this object as a filter. This means hat subsequent autosave requests coming from the same object will be ignored.
AutoSaveResult RequestAutoSave()
inherited fromIDocumentObject

SetCreationInfo

Set the CreatedBy and CreatedAt fields if they haven't been set already.
void SetCreationInfo()
inherited fromIDocumentObject

SetModificationInfo

Set the ModifiedBy and ModifiedAt fields.
void SetModificationInfo()
inherited fromIDocumentObject

Store

This method is called whenever the instance is required to serialize itself.
void Store(
writer
Writer object to serialize with.
)
inherited fromIStorable

UpdateDisplay

Recreate the display caches based on the given solution data and display rules.
void UpdateDisplay(
data,
Data from which to extract display caches.
rules,
Optional display rules.
token
Cancellation token.
)
inherited fromIDocumentObject

Events

ActivityChanged

Raised whenever the Enabled state of this object changes.
event EventHandler<ObjectEventArgs> ActivityChanged
inherited fromIDocumentObject

AutosaveRequested

Raised whenever this object requests an autosave.
event EventHandler<ObjectAutoSaveEventArgs> AutosaveRequested
inherited fromIDocumentObject

DisplayChanged

Raised whenever the display state of this object changes.
event EventHandler<ObjectEventArgs> DisplayChanged
inherited fromIDocumentObject

DocumentChanged

Raised whenever this object becomes part of a different document.
event EventHandler<ObjectDocumentEventArgs> DocumentChanged
inherited fromIDocumentObject

Expired

Raised whenever the solution currently held by this object is expired.
inherited fromIDocumentObject

InstanceIdChanged

Raised whenever the InstanceId of this object changes.
event EventHandler<ObjectGuidEventArgs> InstanceIdChanged
inherited fromIDocumentObject

LayoutChanged

Raised whenever the layout of this object changes. Layout invalidation triggers a canvas redraw.
event EventHandler<ObjectEventArgs> LayoutChanged
inherited fromIDocumentObject

NameChanged

Raised whenever the UserName of this object changes. This typically infers that the DisplayName also changes.
inherited fromIDocumentObject

RelevanceChanged

Raised whenever the Auxiliary state of this object changes.
event EventHandler<ObjectEventArgs> RelevanceChanged
inherited fromIDocumentObject

SelectedChanged

Raised whenever the Selected state of this object changes.
event EventHandler<ObjectEventArgs> SelectedChanged
inherited fromIDocumentObject