public abstract class AbstractParameter : ActiveObject, IParameter
Absolute lowest implementation of IParameter, do not derive directly from this abstract class, instead consider the Parameter and Parameter<T> classes as starting points.

Constructors

AbstractParameter

#
Deserialization constructor.
protected AbstractParameter(
reader
Reader object.
)

AbstractParameter

#
Create a new parameter.
protected AbstractParameter(
nomen,
access,
flavour
)

AbstractParameter

#
Create a new parameter.
protected AbstractParameter(
name,
userName,
info,
access,
flavour
)

Properties

Access

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

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

Activity

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

Attributes

Gets or sets the attributes for this object.
public IAttributes Attributes { get; }
inherited fromDocumentObject
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.
public virtual IEnumerable<IDocumentObject> ChildrenObjects { get; }
inherited fromDocumentObject
ChildrenObjects

ColourOverride

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

Connectivity

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

CustomValues

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

Display

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

DisplayCache

Gets or sets the ActiveObject.DisplayCache to use while displaying this object.
public DisplayCache DisplayCache { get; }
inherited fromActiveObject

DisplayCapable

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

DisplayName

#
public override string DisplayName { get; }

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

Document

Gets or sets the document this object belongs to. It is possible an object does not belong to any document, however it can never belong to more than one document simultaneously.
public Document Document { get; set; }
inherited fromDocumentObject
Document

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

Expression

#
Gets the expression associated with the expression text, if the text is not null/empty and a valid expression. Note that if the ExpressionEnabled property is set to false, this property still returns an expression if it can.
public Expression Expression { get; }

ExpressionEnabled

#
Gets or sets whether the expression is taken into consideration.
public bool ExpressionEnabled { get; set; }

ExpressionText

#
Gets or sets the expression text for this parameter.
public string ExpressionText { get; set; }

FallbackName

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

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.
public IDocumentObject FoundingObject { get; }
inherited fromDocumentObject
FoundingObject

HardMetaData

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

Icon

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

IconInternal

Override this method to provide an icon for this object. If the icon is an embedded resource in this assembly with the same name as the class, it will automatically be loaded. The DocumentObject.Icon property calls this property and caches the result.
protected virtual IIcon IconInternal { get; }
inherited fromDocumentObject

Inputs

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

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

Kind

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

ModifierIcons

#
Gets an array of all the state icons for this parameter.
public ModifierIcons ModifierIcons { get; }
ModifierIcons

Modifiers

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

Nomen

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

Obsolete

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

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

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

PersistentDataWeak

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

Phase

Gets the current solution phase of this object.
public virtual Phase Phase { get; }
inherited fromDocumentObject
Phase

PickRelatedItemsNomen

#
Gets the nomen to be used for the 'Set Related Items' button. If this property returns null, the button is not displayed on the pop-over.
protected virtual Nomen PickRelatedItemsNomen { get; }

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

PresetsWeak

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

ProgressPercentage

Gets the progress as a percentage. If this object is currently not calculating a new solution, this number is not meaningful.
public int ProgressPercentage { get; }
inherited fromDocumentObject
ProgressPercentage

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

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.
public Requirement Requirement { get; set; }
Requirement

Selected

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

Selection

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

SiblingObjects

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

SoftMetaData

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

State

Gets the current state of this object. This is always the most recently completed state.
public override ObjectSolutionState State { get; }
inherited fromActiveObject

TypeAssistantWeak

#
Each parameter type ought to provide an assistant. However this property may return null, in which case a lot of functionality will not be available.
public abstract ITypeAssistant TypeAssistantWeak { get; }
TypeAssistantWeak

TypeFlavour

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

UserName

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

Methods

AddUndoRecord

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

AddUndoRecord

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

AppendBakeInput

Append the baking input panel.
protected void AppendBakeInput()
inherited fromDocumentObject

AppendCleaningModifiers

#
Append the parameter modifiers to do with cleaning, (Remove Empty Twig, Remove Nulls, Remove Invalid).
protected void AppendCleaningModifiers()

AppendCustomModifiers

#
Override this method to append a bar with custom modifiers, or, if you really want, mess with the already added input panel elements.
protected virtual void AppendCustomModifiers()

AppendDataElements

#
Append the parameter persistent data setters. (Clear, Internalise, Set One, Set Many, Edit).
protected void AppendDataElements()

AppendExpressionModifier

#
Append the expression modifier UI to the input panel. Override this method and do nothing to disable expressions on this parameter.
protected virtual void AppendExpressionModifier()

AppendModifierIcons

#
Override this method if you with to add your own modifier icons to this parameter.
protected virtual ModifierIcons AppendModifierIcons()

AppendOrderingModifierElements

#
Append the parameter modifiers to do with item ordering, (Sort, Randomise, Reverse).
protected void AppendOrderingModifierElements()

AppendStateInput

Append the 'Enabled' and 'Display' states to this input panel.
protected void AppendStateInput(
panel,
Panel to append to.
enabledState,
If true, the Enabled state button will be modifiable.
displayState
If true, the Display state button will be modifiable.
)
inherited fromDocumentObject

AppendToInputPanel

#
public override void AppendToInputPanel()

AppendTopologyModifierElements

#
Append all default modifier options.
protected void AppendTopologyModifierElements()

AppendUserNameInput

Append the user name text box within a category labelled 'Attributes'.
protected void AppendUserNameInput()
inherited fromDocumentObject

AppendVariableAccessElements

#
Append the group of input access variability inputs (Item, Twig, Tree), depending on parameter state.
protected void AppendVariableAccessElements()

ChangeInstanceIds

public void ChangeInstanceIds()
inherited fromDocumentObject

ClearModifierIcons

#
[EditorBrowsable(EditorBrowsableState.Never)] public void ClearModifierIcons()
ClearModifierIcons

CollectFromPersistent

#
protected abstract SolutionData CollectFromPersistent()

CollectFromSources

#
protected abstract SolutionData CollectFromSources(
solution,
stack,
Guid[]
inputs
)

Compute

Compute a new solution for this object, or return a completed solution if one is available.
public sealed override SolutionData Compute(
solution,
stack
)
inherited fromActiveObject
Result of computation.

ComputeInternal

#
protected override SolutionData ComputeInternal(
solution,
stack
)

CreateAttributes

#
Create default attributes for this object. If attributes already exist, this method will not replace them.
protected override IAttributes CreateAttributes()

CreateEmptyTree

#
Create an empty tree which can be used as a placeholder for null data in solution results.
protected abstract ITree CreateEmptyTree()

CreateValueControl

#
Construct a lightweight control suitable for editing this parameter's value. Control provider is responsible for handling undo record and assigning changes. Return null if no control makes sense in any particular case. Note that the control which is returned by this method may never be shown.
public virtual Control CreateValueControl()

DisplayBounds

public override BoundingBox DisplayBounds()
inherited fromActiveObject

DisplayFaces

public override void DisplayFaces(
pipeline,
guises,
extents
)
inherited fromActiveObject

DisplayWires

public override void DisplayWires(
pipeline,
guises,
extents
)
inherited fromActiveObject

EditMetaData

#
Pop up the hard and soft meta data editor.
public void EditMetaData()

EditPersistentValues

#
Show the persistent values editor.
public virtual void EditPersistentValues(
preferPick,
If true, and if available, the picker UI will be shown even if there are already existing values.
preferEdit
If true, and if available, the editing UI will be shown even if there are no existing values yet.
)

Expire

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

ExpireAllRecipients

#
protected override void ExpireAllRecipients()

ExpireDisplay

Expire the attributes and raise the DisplayChanged event.
protected void ExpireDisplay()
inherited fromDocumentObject

ExpireReferences

#
Expire all references which match a validator method.
public virtual 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 removed. I.e. GH1-style behaviour.
)
True if the object state was modified due to a reference change.
ExpireReferences

GetAllSourceTrees

#
protected ITree[] GetAllSourceTrees(
solution,
stack,
Guid[]
inputs
)

GetCreationInfo

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

GetModificationInfo

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

InvalidateExistingLayout

Invalidate the attribute layout, but only if the attributes already exist.
protected void InvalidateExistingLayout()
inherited fromDocumentObject

ModifyAndProcessResult

#
Apply the modifiers and the ProcessResult(Solution, SolutionData) method. This is automatically called as part of the standard ComputeInternal(Solution, CallStack) logic, so unless you're overriding that, you have no need of this method.
protected SolutionData ModifyAndProcessResult(
solution,
stack,
result
)

ModifyIcon

Override the icon for this object. Use this judiciously.
public 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 fromDocumentObject
ModifyIcon

ModifyNameAndInfo

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

OnDisplayChanged

public void OnDisplayChanged()
inherited fromDocumentObject
OnDisplayChanged

OnExpired

Raise the Expired event.
protected internal void OnExpired()
inherited fromDocumentObject

OnLayoutChanged

public void OnLayoutChanged()
inherited fromDocumentObject
OnLayoutChanged

OverrideAccess

#
Method for overriding the access. You almost never want to change this yourself, which is why this functionality is hidden behind this method.
[EditorBrowsable(EditorBrowsableState.Never)] public void OverrideAccess(
access,
expire
)

OverrideAccess

#
Override the access of this parameter. This is dangerous and almost never needed at runtime. Consider enabling AccessVariability if the access needs to change over time.
[EditorBrowsable(EditorBrowsableState.Never)] public void OverrideAccess(
access
)

OverrideAttributes

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

PickManyItems

#
Override this method to specify many values.
protected virtual ITree PickManyItems()

PickOneItem

#
Override this method to specify a single value.
protected virtual IPear PickOneItem()

PickRelatedItems

#
Override this method to specify many related values. This usually translates to the special pickers. Many parameters do not override this method and that's absolutely fine.
protected virtual ITree PickRelatedItems()

PopulateDisplay

Override this method to populate a display bag from a computed result. The DisplayCapable property will return true if this method has been overridden.
protected virtual void PopulateDisplay(
result,
Solution result.
bag,
Bag to populate.
token
Cancellation token.
)
inherited fromActiveObject

ProcessResult

#
Override this method if you wish to post-process the default result of this parameter. The intermediate result will either contain the merged tree of all source objects or the persistent data, processed by the parameter modifiers. It will also contain all relevant type conversion messaging. You may choose to replace the data in the intermediate result, add messages, or create an entirely new Result instance, but do note that the intermediate may contain a lot of useful messaging.
protected virtual SolutionData ProcessResult(
solution,
Solution associated with this result.
intermediateResult
Default result computed by the standard parameter implementation.
)
Identical, modified or different Result.

RequestAutoSave

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

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.
public AutoSaveResult RequestAutoSave(
reason
Autosave reason.
)
inherited fromDocumentObject
RequestAutoSave

RevertProperties

#
Revert various parameter properties to default values.
public static void RevertProperties(
target,
Parameter to modify.
aspects = StateAspects.Revertable
Aspects to reset. Note that not all states can be reverted.
)

SetCreationInfo

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

SetModificationInfo

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

SetProgressPercentage

Set the DocumentObject.ProgressPercentage field directly. The percentage is automatically limited to the [0, 100] interval.
public void SetProgressPercentage(
percentage
)
inherited fromDocumentObject

SetProgressPercentage

Set the DocumentObject.ProgressPercentage field based on a step count. This method always limits the percentage to the [1, 99] range, as 0% and 100% are oftentimes indicative of unstarted or completed processes, which probably gives the wrong impression.
public void SetProgressPercentage(
partial,
Current step.
total
Total steps.
)
inherited fromDocumentObject

SiphonProperties

#
Carry over properties from one parameter to another.
public static void SiphonProperties(
source,
Parameter to inspect.
target,
Parameter to modify.
aspects = StateAspects.All
Aspects of parameter state to carry over.
)

Store

#
public override void Store(
writer
)
Store

UpdateDisplay

public override void UpdateDisplay()
inherited fromActiveObject

VolatileDataDescription

#
Gets a set of strings which describe the current state of this parameter. This is used primarily to populate tooltip content.
public LazyStrings[] VolatileDataDescription()

Events

ActivityChanged

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

AutosaveRequested

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

ColourOverrideModified

#
protected event EventHandler ColourOverrideModified

DisplayChanged

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

DocumentChanged

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

Expired

Raised whenever the solution currently held by this object is expired.
public event EventHandler<ObjectEventArgs> Expired
inherited fromDocumentObject
Expired

InstanceIdChanged

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

LayoutChanged

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

NameChanged

Raised whenever the UserName of this object changes. This typically infers that the DisplayName also changes.
public event EventHandler<ObjectNameEventArgs> NameChanged
inherited fromDocumentObject
NameChanged

RelevanceChanged

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

SelectedChanged

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