# ObjectList 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
[IoId("00000000-99c0-407b-b68e-4bd816baf526")]
public class ObjectList : IStorable
```

Represents the collection of all objects in a document.

## Properties

- [ActiveObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/activeobjects.md): Gets a foreach enumerator for all top-level objects which are potentially active during solutions. This enumerator only considers objects whose phase is set to something other than ObjectPhase.Irrelevant.
- [AllAttributes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/allattributes.md): Gets a foreach enumerator for all primary and subsidiary object attributes.
- [AllWires](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/allwires.md): Enumerates over all wires in this document. This includes dangling wires whose source or target parameter may no longer exist.
- [AttributeBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/attributebounds.md): Gets the strict bounds of all the top-level attributes in this document. Note that the wires which connect outputs and inputs may exceed these bounds.
- [Attributes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/attributes.md): Gets a foreach enumerator for all primary object attributes.
- [Backwards](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/backwards.md): Gets a foreach enumerator for all primary objects in reverse order (front to back).
- [Connectivity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/connectivity.md): Gets the connectivity of this document. This represents an immutable snapshot of all active objects and groups and their connections.
- [Count](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/count.md): Gets the number of objects stored in this collection. Only primary objects are included in the count.
- [DisabledObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/disabledobjects.md): Gets a foreach enumerator for all top-level disabled objects.
- [EnabledObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/enabledobjects.md): Gets a foreach enumerator for all top-level enabled objects.
- [ExpiredCount](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/expiredcount.md): Gets the number of expired and aborted objects. This only includes top-level objects.
- [ExpiredObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/expiredobjects.md): Gets a foreach enumerator for all top-level objects which are either expired or aborted.
- [Forwards](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/forwards.md): Gets a foreach enumerator for all primary objects.
- [Groups](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/groups.md): Enumerate over all groups.
- [PinCount](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/pincount.md): Gets the number of document-level pins.
- [Pins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/pins.md): Get a foreach enumerator for all document-level pins.
- [PivotBounds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/pivotbounds.md): Gets the strict bounds of all the top-level attribute pivots in this document. This does typically not require a layout pass and as such is a quicker and more reliable, albeit less accurate way to measure the extends of the objects.
- [PrimaryAndSecondary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/primaryandsecondary.md): Gets a foreach enumerator for all primary and subsidiary objects. This will include those objects which are part of other objects, such as input or output parameters.
- [SelectedCount](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/selectedcount.md): Gets the number of selected objects. This only includes top-level objects.
- [SelectedObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/selectedobjects.md): Gets a foreach enumerator for all top-level selected objects.
- [SelectedWireCount](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/selectedwirecount.md): Gets the number of selected wires. This count may include wires which are no longer drawn, as the list is only updated in response to UI events, not programmatic changes to the graph.
- [SelectedWires](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/selectedwires.md): Iterate over all selected wires.
- [SupportedPins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/supportedpins.md): Iterate over all the supported pin IDs as reported by all objects in this document.
- [UnselectedObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/unselectedobjects.md): Gets a foreach enumerator for all top-level unselected objects.

## Methods

- [Absorb](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/absorb.md): Absorb all objects from another [ObjectList](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist.md). This eventually empties the other list completely.
- [Add](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/add.md): (4 overloads) Add an object to this collection and change its instance IDs.
- [AddGlobalPin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/addglobalpin.md): Add a document-level pin.
- [ApplyIdMap](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/applyidmap.md): (2 overloads) Apply a custom InstanceID transform to this document.
- [ChangeAllIds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/changeallids.md): Mutate the instanceIds of all the objects in this document. This must be done if the objects are about to be merged into another document which may contain objects with the same IDs. The regular methods in Grasshopper (paste, merge, etc.) already do this. Never change the InstanceIDs yourself, only ever use this method to do so.
- [ClearDisplayCaches](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/cleardisplaycaches.md): Clear the display caches. Caches should be updated or cleared automatically when modifying the [ObjectList.Forwards](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/forwards.md) via standard methods.
- [CompactMetadataDictionary](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/compactmetadatadictionary.md): Try and compact the meta data summary by merging the value hashsets into shorter descriptions.
- [ContainingGroups](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/containinggroups.md): Iterate over all groups which (directly) contain the given instance ID. This enumerator will not return groups which contain groups which contain the object.
- [Contains](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/contains.md): Test whether an instanceId is defined in this collection.
- [DeselectAllWires](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/deselectallwires.md): Deselect all wires.
- [DeselectWire](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/deselectwire.md): (2 overloads) Deselect a specific wire.
- [DisplayableObjects](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/displayableobjects.md): Gets all display capable objects in this document, regardless of states and properties. *If* an object can draw displays, it will be included in this collection. This array is cached, calling this method repeatedly should be fine from a performance point of view.
- [ExpireAll](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/expireall.md): Expire all objects in this collection.
- [Find](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/find.md): Find the object with the given instanceID.
- [FindByInlet](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/findbyinlet.md): Find the parameter with the inlet closest to the search point. This method will find an inlet even if it is occluded by another object.
- [FindByInletOrOutlet](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/findbyinletoroutlet.md): Find the parameter with an inlet or outlet closest to the search point. This method wil not return inlets or outlets which are occluded by other objects.
- [FindByOutlet](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/findbyoutlet.md): Find the parameter with the outlet closest to the search point. This method will find an outlet even if it is occluded by another object.
- [FindBySearch](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/findbysearch.md): Find the objects that match the search string. UNFINISHED METHOD. I need to figure out what fields to search and what the notation might look like.
- [FindComponent](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/findcomponent.md): Find the component with the given instanceID.
- [FindGroup](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/findgroup.md): Find the group with the given instanceID.
- [FindNear<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/findnear.md): Find all objects at the given location, sorted from most relevant to least relevant. Objects in front of other objects are more relevant, and objects closer to the locus are also more relevant.
- [FindParameter](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/findparameter.md): Find the parameter with the given instanceID.
- [ForwardsOfT<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/forwardsoft.md): Iterate over all top-level objects and return those which are of the specified type.
- [IsWireSelected](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/iswireselected.md): (2 overloads) Gets whether a specific connection is considered selected.
- [MetaDataSummaries](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/metadatasummaries.md): Get the meta data summaries of the current object set.
- [MetaNames](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/metanames.md): Enumerate over all meta names used in this document. Note that meta names may change during every solution. This method will iterate over all objects regardless of whether new solutions are happening while it's busy.
- [MetaNamesAndValues](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/metanamesandvalues.md): Find all meta names and associated values. Note that meta names may change during every solution. This method will iterate over all objects regardless of whether new solutions are happening while it's busy.
- [ObjectsByDrawOrder](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectsbydraworder.md): Enumerate over all objects in the (reverse) order in which they are drawn. That is, the first object returned is the topmost one, and so on. The draw order is a fairly complicated one since the introduction of Pins, which can be attached to objects with different draw-order and even different draw-layer.
- [ReadPureObjectList](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/readpureobjectlist.md): (static) Read a list of objects without any other context.
- [Remove](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/remove.md): (2 overloads) Remove an object from this collection.
- [RemoveGlobalPin](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/removeglobalpin.md): Remove the pin with the given type id.
- [RepairPins](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/repairpins.md): Perform a set of pin/cushion repair methods.
- [ResolvePick](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/resolvepick.md): Resolve the target of a pick operation on all the objects in this document. Note that this will not include any wires, as the shapes of wires aren't known to the document. Only the Canvas which draws the document knows where and how wires are drawn so if you want a pick which includes the wires, you must use the Canvas.ResolvePick() method instead.
- [SearchDownstream](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/searchdownstream.md): Iterate over all objects that are downstream from a parameter. This includes the component if the parameter is an input, it will include all target parameters, their components, the outputs of those components, and so on. This a depth-first search without duplicates.
- [SearchUpstream](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/searchupstream.md): Iterate over all objects that are upstream from a parameter. This includes the component if the parameter is an output, it will include all source parameters, their components, the inputs of those components, and so on. This a depth-first search without duplicates.
- [SelectWire](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/selectwire.md): (2 overloads) Select a specific wire.
- [ShootRay](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/shootray.md): Shoot a ray through the display geometry of all objects and see which one is hit.
- [Store](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/store.md): (4 overloads) Serialization method with custom contents.
- [WindowSelect](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/windowselect.md): Perform a window selection on all objects and wires.

## Events

- [ObjectAdded](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectadded.md): This event will be raised after an object has been added to this collection.
- [ObjectDisplayChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectdisplaychanged.md): Raised whenever the display state of one of the objects in this collection expires.
- [ObjectEnabledChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectenabledchanged.md): Raised whenever one of the objects in this collection changes its enabled state.
- [ObjectExpired](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectexpired.md): Raised whenever one of the objects in this collection expires.
- [ObjectInstanceIdChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectinstanceidchanged.md): Raised whenever the instance ID of one of theobjects in this collection expires.
- [ObjectLayoutChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectlayoutchanged.md): Raised whenever the layout of one of the objects in this collection expires.
- [ObjectNameChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectnamechanged.md): Raised whenever one of the objects in this collection changes its name.
- [ObjectRelevanceChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectrelevancechanged.md): Raised whenever one of the objects in this collection changes its auxiliary state.
- [ObjectRemoved](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectremoved.md): This event will be raised after an object has been removed from this collection.
- [ObjectSelectionChanged](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.objectlist/objectselectionchanged.md): Raised whenever one of the objects in this collection changes its selected state.
