# DocumentObjectExtensionMethods class

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

```cs
public static class DocumentObjectExtensionMethods
```

Provides extension methods for [IDocumentObject](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.idocumentobject.md) types.

## Methods

- [AllInstanceIds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.documentobjectextensionmethods/allinstanceids.md): (static) Create a hash set containing all the instance Ids of a set of objects. This includes the subobjects.
- [IterateOverAllInstanceIds](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.documentobjectextensionmethods/iterateoverallinstanceids.md): (static) Iterate over the InstanceIds of all objects and subobjects in a collection.
- [IterateOverAllMessages](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.documentobjectextensionmethods/iterateoverallmessages.md): (static) Try and enumerate over all messages in an object family.
- [SmartScrollX](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.documentobjectextensionmethods/smartscrollx.md): (static) Perform a scrolling operation in X, with automatic limiting.
- [SmartScrollY](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.documentobjectextensionmethods/smartscrolly.md): (static) Perform a scrolling operation in Y, with automatic limiting.
- [SortTopToBottom<T>](https://developer.rhino3d.com/api/gh2/type/grasshopper2.extensions.documentobjectextensionmethods/sorttoptobottom.md): (2 overloads, static) Sort the objects in a list by their attribute bounds from top to bottom.
