IParameter
References- IParameter<T>
Nothing matches.
Base interface for parameters. Never directly implement this interface, always inherit from AbstractParameter, Parameter, or Parameter<T> instead.
Properties
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.
Activity
Gets or sets the active state of this object. Note that this property is meaningless for certain types of object.
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.
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.
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.
CustomValues
Gets a collection of keyed values which can be used to store custom data which will survive (de)serialisation.
Display
Gets or sets the display state of this object. Note that this property is meaningless for certain types of object.
DisplayCapable
Gets whether this object makes allowance for 3D viewport displays.
DisplayName
Gets the display name of this object. Often the DisplayName is identical to the UserName, but there could be more complicated algorithms involved.
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.
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.
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.
FallbackName
#Gets or sets a fallback name to be used as DisplayName in case the UserName is null or empty.
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.
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.
Inputs
#Gets the input parameters. This list only includes parameters that are connected through wires, it does not include globals this parameter depends on.
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.
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.
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.
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.
ProgressPercentage
Gets an object progress percentage while the object is computing. The Grasshopper UI may or may not choose to display this percentage somewhere.
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.
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.
Selection
Gets or sets the selected state of this object. Note that the selected setting of secondary objects is inherited from the parent.
SiblingObjects
Gets all sibling objects in the object family tree.
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.
Methods
AddUndoRecord
void AddUndoRecord(Record record)
Add a custom undo record for this object.
Parameters:
| record (Record) | Undo record to add. |
Returns: Id of undo record.
AddUndoRecord
Add a single action undo record for this object.
AppendToInputPanel
Append the object specific items to an existing input panel.
Parameters:
| panel (InputPanel) |
ClearModifierIcons
#Clear the modifier icon caches. Call this method if the icons change without a new solution being involved.
Compute
Compute a new solution for this object, or return a completed solution if one is available.
DisplayFaces
Draw the shaded faces for this object.
Parameters:
| pipeline (DisplayPipeline) | |
| guises (Guises) | |
| extents (ref BoundingBox) |
DisplayWires
Draw the wires for this object.
Parameters:
| 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.
ExpireReferences
Expire all references which match a validator method.
Parameters:
| 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. |
Returns: True if the object state was modified due to a reference change.
GetCreationInfo
Gets information about who created this component and when.
GetModificationInfo
Gets information about who last modified this component and when.
ModifyIcon
Override the icon for this object. Use this judiciously.
ModifyNameAndInfo
Programmatically modify the nickname, name and/or info strings on the Nomen.
OverrideAttributes
Assign new attributes to this object. Not all attributes may be accepted, it depends on the implementation.
Parameters:
| attributes (IAttributes) | New attributes to assign. Assigning null will revert to default attributes. |
Returns: True if attributes were accepted.
RequestAutoSave
Request an autosave.
Parameters:
| reason (AutoSaveReason) | Autosave reason. |
| autosaveId (Guid) | Autosave Id. Consecutive requests with identical Ids are ignored. |
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.
Parameters:
| reason (AutoSaveReason) |
SetCreationInfo
void SetCreationInfo()
Set the CreatedBy and CreatedAt fields if they haven't been set already.
SetModificationInfo
void SetModificationInfo()
Set the ModifiedBy and ModifiedAt fields.
Store
This method is called whenever the instance is required to serialize itself.
Parameters:
| writer (IWriter) | Writer object to serialize with. |
UpdateDisplay
Recreate the display caches based on the given solution data and display rules.
Parameters:
| data (SolutionData) | Data from which to extract display caches. |
| rules (DisplayRules) | Optional display rules. |
| token (CancellationToken) | Cancellation token. |
Events
ActivityChanged
Raised whenever the Enabled state of this object changes.
AutosaveRequested
Raised whenever this object requests an autosave.
DisplayChanged
Raised whenever the display state of this object changes.
DocumentChanged
Raised whenever this object becomes part of a different document.
Expired
Raised whenever the solution currently held by this object is expired.
InstanceIdChanged
Raised whenever the InstanceId of this object changes.
LayoutChanged
Raised whenever the layout of this object changes. Layout invalidation triggers a canvas redraw.
NameChanged
Raised whenever the UserName of this object changes. This typically infers that the DisplayName also changes.
RelevanceChanged
Raised whenever the Auxiliary state of this object changes.
SelectedChanged
Raised whenever the Selected state of this object changes.