[IoId("00000000-f5cd-4ad4-b894-78beac6fbe39")] [Author("DavidR")] public sealed class TimerObject : DocumentObject, IGuidAware
Standard Grasshopper timer/trigger object.

Constructors

TimerObject

#
Create a new timer object.
public TimerObject()

TimerObject

#
Deserialisation constructor.
public TimerObject(
reader
)

Properties

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

Connectivity

#
public 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

Delay

#
Gets or sets the delay of this timer.
public TimeSpan Delay { get; set; }

DelayDisplayText

#
public string DelayDisplayText { get; }

DelayText

#
public string DelayText { get; }

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

DisplayCapable

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

DisplayName

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

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

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

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

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

Manual

#
Gets or sets whether this timer is in manual mode.
public bool Manual { get; set; }

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

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

Phase

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

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

Running

#
Gets or sets whether this timer is currently running.
public bool Running { get; set; }

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

State

#
public override ObjectSolutionState State { get; }

TargetCount

#
Gets the number of targets. Note that this may include targets which are not currently present in the document, so it may well be an over count.
public int TargetCount { get; }

TargetIds

#
Enumerate over the instance ids of all objects targeted by this timer.
public Guid[] TargetIds { get; }

Targets

#
Enumerate over all resolvable objects targeted by this timer.
public IEnumerable<IDocumentObject> Targets { get; }

UserName

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

Methods

AddTarget

#
Add a target object to this timer.
public bool AddTarget(
id
Instance id of the object to target.
)
True if the target was added, false if it was already present or invalid.

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

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

AppendUserNameInput

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

ChangeInstanceIds

public void ChangeInstanceIds()
inherited fromDocumentObject

Compute

#
public override SolutionData Compute(
solution,
stack
)

CreateAttributes

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

DisplayBounds

Gets the bounds of the geometry this object might display.
public virtual BoundingBox DisplayBounds()
inherited fromDocumentObject
DisplayBounds

DisplayFaces

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

DisplayWires

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

Expire

#
public override void Expire()

ExpireDisplay

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

FormatDelay

#
public static string FormatDelay(
delay
)

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.
Explicit

IGuidAware.ApplyIdMap

#
void IGuidAware.ApplyIdMap()
ApplyIdMap

InvalidateExistingLayout

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

IsTarget

#
Gets whether the given object is targeted by this timer.
public bool IsTarget(
id
)

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

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

RemoveTarget

#
Remove a target object from this timer.
public bool RemoveTarget(
id
)

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

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

#
Serialise this object.
public override void Store(
writer
)

UpdateDisplay

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

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

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