# DocumentObject class

Namespace: [Grasshopper2.Doc](https://developer.rhino3d.com/api/gh2/namespace/grasshopper2.doc.md) · Assembly: [Grasshopper2](https://developer.rhino3d.com/api/gh2/assembly/grasshopper2.md)

```cs
[DebuggerDisplay("{DebuggerDisplay}")]
public abstract class DocumentObject : IDocumentObject
```

Abstract implementation of the IDocumentObject interface for all objects.

**Derived types:** [ActiveObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.activeobject.md), [GroupObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.specialobjects.groupobject.md), [MultiObjectWrapper](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.migration.multiobjectwrapper.md), [ScratchObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.specialobjects.scratchobject.md), [ScribbleObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.specialobjects.scribbleobject.md), [TimerObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.parameters.special.timerobject.md)

## Constructors

- [DocumentObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/ctor.md): (2 overloads) Deserialization constructor.

## Properties

- [Activity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/activity.md): Gets or sets the active state of this object. Note that this property is meaningless for certain types of object.
- [Attributes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/attributes.md): Gets or sets the attributes for this object.
- [ChildrenObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/childrenobjects.md): 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](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/connectivity.md): 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.
- [CustomValues](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/customvalues.md): Gets a collection of keyed values which can be used to store custom data which will survive (de)serialisation.
- [Display](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/display.md): Gets or sets the display state of this object. Note that this property is meaningless for certain types of object.
- [DisplayCapable](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displaycapable.md): Gets whether this object makes allowance for 3D viewport displays.
- [DisplayName](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displayname.md): Gets the display name of this object. Often the DisplayName is identical to the UserName, but there could be more complicated algorithms involved.
- [DisplayStyle](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displaystyle.md): 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](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/document.md): 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.
- [EntireFamily](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/entirefamily.md): 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](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/foundingobject.md): Gets the root or founding object in the object hierarchy. If the current object does not have a parent, it is a founding object.
- [Icon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/icon.md): Gets the icon associated with this object.
- [IconInternal](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/iconinternal.md): 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](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/icon.md) property calls this property and caches the result.
- [InstanceId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/instanceid.md): 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.
- [Nomen](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/nomen.md): Gets the user friendly description of this object.
- [Obsolete](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/obsolete.md): Gets whether this object is considered obsolete.
- [ParentObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/parentobject.md): 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.
- [Phase](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/phase.md): Gets the current solution phase of this object.
- [ProgressPercentage](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/progresspercentage.md): Gets the progress as a percentage. If this object is currently not calculating a new solution, this number is not meaningful.
- [Relevance](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/relevance.md): 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.
- [Selected](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/selected.md): Gets the main yes/no state from the SelectionState.
- [Selection](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/selection.md): Gets or sets the selected state of this object. Note that the selected setting of secondary objects is inherited from the parent.
- [SharedOptionWidth](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/sharedoptionwidth.md): (static) Gets the minimum width needed for drawing the widest option label.
- [SiblingObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/siblingobjects.md): Gets all sibling objects in the object family tree.
- [StandardColourOverrides](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/standardcolouroverrides.md): (static)
- [State](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/state.md): Gets the current solution state of this object.
- [UserName](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/username.md): Gets the user specified name of this object.

## Methods

- [AddUndoRecord](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/addundorecord.md): (2 overloads) Add a custom undo record for this object.
- [AppendBakeInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/appendbakeinput.md): Append the baking input panel.
- [AppendStateInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/appendstateinput.md): Append the 'Enabled' and 'Display' states to this input panel.
- [AppendToInputPanel](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/appendtoinputpanel.md): Override this method to populate the popover panel. The base implementation does not add any panel inputs, however the DocumentObject class does provide a slew of protected utility methods for adding standard inputs.
- [AppendUserNameInput](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/appendusernameinput.md): Append the user name text box within a category labelled 'Attributes'.
- [ChangeInstanceIds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/changeinstanceids.md)
- [Compute](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/compute.md): Compute a new solution for this object, or return a completed solution if one is available.
- [CreateAttributes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/createattributes.md): Create default attributes for this object. If attributes already exist, this method will not replace them.
- [DisplayBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displaybounds.md): Gets the bounds of the geometry this object might display.
- [DisplayFaces](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displayfaces.md): Draw the shaded faces for this object.
- [DisplayWires](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displaywires.md): Draw the wires for this object.
- [Expire](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/expire.md): Expire this object and all objects that depend on it. This will request-cancel any running solutions inside whatever document contains this object.
- [ExpireDisplay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/expiredisplay.md): Expire the attributes and raise the DisplayChanged event.
- [GetCreationInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/getcreationinfo.md): Gets information about who created this component and when.
- [GetModificationInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/getmodificationinfo.md): Gets information about who last modified this component and when.
- [InvalidateExistingLayout](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/invalidateexistinglayout.md): Invalidate the attribute layout, but only if the attributes already exist.
- [ModifyIcon](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/modifyicon.md): Override the icon for this object. Use this judiciously.
- [ModifyNameAndInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/modifynameandinfo.md): Programmatically modify the nickname, name and/or info strings on the Nomen.
- [OnDisplayChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/ondisplaychanged.md): Raise the [DocumentObject.DisplayChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displaychanged.md) event.
- [OnExpired](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/onexpired.md): Raise the Expired event.
- [OnLayoutChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/onlayoutchanged.md): Raise the [DocumentObject.LayoutChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/layoutchanged.md) event.
- [OverrideAttributes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/overrideattributes.md): Assign new attributes to this object. Not all attributes may be accepted, it depends on the implementation.
- [RequestAutoSave](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/requestautosave.md): (2 overloads) Request an autosave.
- [SetCreationInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/setcreationinfo.md): Set the CreatedBy and CreatedAt fields if they haven't been set already.
- [SetModificationInfo](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/setmodificationinfo.md): Set the ModifiedBy and ModifiedAt fields.
- [SetProgressPercentage](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/setprogresspercentage.md): (2 overloads) Set the [DocumentObject.ProgressPercentage](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/progresspercentage.md) field directly. The percentage is automatically limited to the [0, 100] interval.
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/store.md): Serialise this object.
- [UpdateDisplay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/updatedisplay.md): Recreate the display caches based on the given solution data and display rules.

## Events

- [ActivityChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/activitychanged.md): Raised whenever the Enabled state of this object changes.
- [AutosaveRequested](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/autosaverequested.md): Raised whenever this object requests an autosave.
- [DisplayChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/displaychanged.md): Raised whenever the display state of this object changes.
- [DocumentChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/documentchanged.md): Raised whenever this object becomes part of a different document.
- [Expired](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/expired.md): Raised whenever the solution currently held by this object is expired.
- [InstanceIdChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/instanceidchanged.md): Raised whenever the InstanceId of this object changes.
- [LayoutChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/layoutchanged.md): Raised whenever the layout of this object changes. Layout invalidation triggers a canvas redraw.
- [NameChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/namechanged.md): Raised whenever the UserName of this object changes. This typically infers that the DisplayName also changes.
- [RelevanceChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/relevancechanged.md): Raised whenever the Auxiliary state of this object changes.
- [SelectedChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.documentobject/selectedchanged.md): Raised whenever the Selected state of this object changes.
