Constructors

Parameter

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

Parameter

#
Create a new parameter.
protected Parameter(
nomen,
Description of parameter.
access = Access.Tree
Parameter access.
)

Parameter

#
Create a new parameter.
protected Parameter(
name,
Name of parameter.
userName,
User name of parameter.
info,
Parameter info.
access = Access.Tree
Parameter access.
)

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; }
inherited fromAbstractParameter
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; }
inherited fromAbstractParameter
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; }
inherited fromAbstractParameter
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; }
inherited fromAbstractParameter

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; }
inherited fromAbstractParameter

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 AbstractParameter.ExpressionEnabled property is set to false, this property still returns an expression if it can.
public Expression Expression { get; }
inherited fromAbstractParameter

ExpressionEnabled

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

ExpressionText

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

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; }
inherited fromAbstractParameter
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; }
inherited fromAbstractParameter
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; }
inherited fromAbstractParameter
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; }
inherited fromAbstractParameter
Kind

ModifierIcons

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

Modifiers

Gets or sets the modifiers associated with this parameter.
public Modifiers Modifiers { get; set; }
inherited fromAbstractParameter
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; }
inherited fromAbstractParameter
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

#
public override ITree PersistentDataWeak { get; set; }

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; }
inherited fromAbstractParameter

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; }
inherited fromAbstractParameter

PresetsWeak

#
public override IPresets PresetsWeak { get; }

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; }
inherited fromAbstractParameter
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; }
inherited fromAbstractParameter
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; }
inherited fromAbstractParameter
TypeAssistantWeak

TypeFlavour

Gets the flavour of the type this parameter contains.
public TypeFlavour TypeFlavour { get; }
inherited fromAbstractParameter
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()
inherited fromAbstractParameter

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()
inherited fromAbstractParameter

AppendDataElements

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

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()
inherited fromAbstractParameter

AppendModifierIcons

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

AppendOrderingModifierElements

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

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()
inherited fromAbstractParameter

AppendTopologyModifierElements

Append all default modifier options.
protected void AppendTopologyModifierElements()
inherited fromAbstractParameter

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()
inherited fromAbstractParameter

ChangeInstanceIds

public void ChangeInstanceIds()
inherited fromDocumentObject

ClearModifierIcons

[EditorBrowsable(EditorBrowsableState.Never)] public void ClearModifierIcons()
inherited fromAbstractParameter
ClearModifierIcons

CollectFromPersistent

#
protected sealed override SolutionData CollectFromPersistent()

CollectFromSources

#
protected override 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
)
inherited fromAbstractParameter

CreateAttributes

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

CreateDisplayFromTree

#
Override this method to populate displays.
protected virtual void CreateDisplayFromTree()

CreateEmptyTree

#
protected sealed override 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()
inherited fromAbstractParameter

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()
inherited fromAbstractParameter

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.
)
inherited fromAbstractParameter

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()
inherited fromAbstractParameter

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.
)
inherited fromAbstractParameter
True if the object state was modified due to a reference change.
ExpireReferences

GetAllSourceTrees

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

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

LoadNewPersistentData

#
Utility function for overriding persistent data. This method will:
  1. Add an undo record for the current persistent data.
  2. Assign new persistent data.
  3. Expire the parameter.
  4. Trigger a new solution on the document which owns this parameter.
protected void LoadNewPersistentData(
values
)

LoadNewPersistentData

#
Utility function for overriding persistent data. This method will:
  1. Add an undo record for the current persistent data.
  2. Assign new persistent data.
  3. Expire the parameter.
  4. Trigger a new solution on the document which owns this parameter.
protected void LoadNewPersistentData(
params object[]
values
)

ModifyAndProcessResult

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

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
)
inherited fromAbstractParameter

OverrideAccess

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

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

#
Default implementation will show a multi-line text box.
protected override ITree PickManyItems()

PickOneItem

#
Default implementation will show a text box provided the provided WeakAssistant is roundtrippable.
protected override 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()
inherited fromAbstractParameter

PopulateDisplay

#
protected sealed override void PopulateDisplay()

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.
)
inherited fromAbstractParameter
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

Set

#
Set all persistent data. This method overwrites whatever persistent data may already be set.
public Parameter Set(
tree
)
This very same parameter instance. This return value is here so the Set(ITree) method can be chained.

Set

#
Set one or more persistent values at path {0}. This method overwrites whatever persistent data may already be set.
public Parameter Set(
params IPear[]
pears
)
This very same parameter instance. This return value is here so the Set(IPear[]) method can be chained.

Set

#
Set one or more persistent values at path {0}. This method overwrites whatever persistent data may already be set.
public Parameter Set(
params object[]
values
)
This very same parameter instance. This return value is here so the Set(object[]) method can be chained.

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

Store

#
public override void Store(
writer
)

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()
inherited fromAbstractParameter

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
inherited fromAbstractParameter

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