IDocumentObject
ReferencesNothing matches.
Defines the rules and regulations for any object that wishes to be part of an IDocument.
Properties
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.
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.
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.
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.
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.
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.
Selection
#Gets or sets the selected state of this object. Note that the selected setting of secondary objects is inherited from the parent.
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) |
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.
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.
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
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.