IParameter<T>

References
public interface IParameter<T> : IParameter
Generic extension to the IParameter interface for a specific type. Never directly implement this interface, always inherit from AbstractParameter, Parameter, or Parameter<T> instead.
T

Properties

Access

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

AccessVariability

AccessVariability AccessVariability { get; set; }
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.
inherited fromIParameter

Activity

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

Attributes

IAttributes Attributes { get; }
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.
inherited fromIDocumentObject

ChildrenObjects

IEnumerable<IDocumentObject> ChildrenObjects { get; }
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.
inherited fromIDocumentObject

ColourOverride

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

Connectivity

IObjectConnectivity Connectivity { get; }
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.
inherited fromIDocumentObject

CustomValues

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

Display

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

DisplayCapable

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

DisplayName

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

DisplayStyle

ObjectDisplayStyle DisplayStyle { get; set; }
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.
inherited fromIDocumentObject

Document

Document Document { get; set; }
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.
inherited fromIDocumentObject

EntireFamily

IEnumerable<IDocumentObject> EntireFamily { get; }
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.
inherited fromIDocumentObject

FallbackName

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

FoundingObject

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

HardMetaData

MetaData HardMetaData { get; set; }
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.
inherited fromIParameter

Icon

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

Inputs

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

InstanceId

Guid InstanceId { get; set; }
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.
inherited fromIDocumentObject

Kind

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

ModifierIcons

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

Modifiers

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

Nomen

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

Obsolete

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

Outputs

Connections Outputs { get; }
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.
inherited fromIParameter

ParentObject

IDocumentObject ParentObject { get; set; }
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.
inherited fromIDocumentObject

PersistentData

#
Tree<T> PersistentData { get; set; }
Gets or sets the persistent data.

PersistentDataWeak

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

Phase

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

PostProcessInputTrees

Action<ITree[]> PostProcessInputTrees { get; set; }
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.

inherited fromIParameter

Presets

#
Presets<T> Presets { get; }
Gets or sets the presets.

PresetsWeak

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

ProgressPercentage

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

Relevance

ObjectRelevance Relevance { get; set; }
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.
inherited fromIDocumentObject

Requirement

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

Selected

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

Selection

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

SiblingObjects

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

SoftMetaData

MetaData SoftMetaData { get; set; }
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.
inherited fromIParameter

State

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

TypeAssistant

#
ITypeAssistant<T> TypeAssistant { get; }
Gets the type assistant (if any) for the data inside this parameter.

TypeAssistantWeak

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

TypeFlavour

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

UserName

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

Methods

AddUndoRecord

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

AddUndoRecord

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

AppendToInputPanel

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

ClearModifierIcons

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

Compute

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

DisplayBounds

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

DisplayFaces

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

DisplayWires

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

Expire

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

ExpireReferences

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

GetCreationInfo

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

GetModificationInfo

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

ModifyIcon

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

ModifyNameAndInfo

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

OnDisplayChanged

void OnDisplayChanged()
inherited fromIDocumentObject

OnLayoutChanged

void OnLayoutChanged()
inherited fromIDocumentObject

OverrideAttributes

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

RequestAutoSave

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

RequestAutoSave

AutoSaveResult RequestAutoSave(AutoSaveReason reason)
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.
inherited fromIDocumentObject
reason (AutoSaveReason)

SetCreationInfo

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

SetModificationInfo

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

Store

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

UpdateDisplay

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

Events

ActivityChanged

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

AutosaveRequested

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

DisplayChanged

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

DocumentChanged

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

Expired

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

InstanceIdChanged

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

LayoutChanged

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

NameChanged

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

RelevanceChanged

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

SelectedChanged

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