# Connectivity 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
public sealed class Connectivity
```

A readonly snapshot of the object connectivity within a document.

## Constructors

- [Connectivity](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/ctor.md): (2 overloads) Construct a new document connectivity. This is not a threadsafe constructor, if the document is modified during the construction of this connectivity, things may go terribly wrong.

## Properties

- [AllNodes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/allnodes.md): Iterate over all object and group nodes.
- [GroupNodes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/groupnodes.md): Iterate over all group nodes.
- [ObjectNodes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/objectnodes.md): Iterate over all object nodes.

## Methods

- [Find](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/find.md): Low level GUID -> ConnectiveObject resolver. This will search both the object and the group lists.
- [FindAllInputs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/findallinputs.md): (2 overloads) Recursively find all input objects.
- [FindAllOutputs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/findalloutputs.md): (2 overloads) Recursively find all output objects.
- [FindConnections](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/findconnections.md): (2 overloads) Find all connective paths between two objects.
- [FindImmediateInputs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/findimmediateinputs.md): (2 overloads) Iterate over all the immediate inputs for an object. This includes inputs of any attached pins.
- [FindImmediateOutputs](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/findimmediateoutputs.md): (2 overloads) Iterate over all the immediate outputs for an object. This includes outputs of any attached pins.
- [FindNodes](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/findnodes.md): Enumerate over all nodes that match the given IDs. Ids which cannot be found will be ignored.
- [GetConnectiveId](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/getconnectiveid.md): (2 overloads, static) Find the topological ID of an object.
- [IsLinear](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/islinear.md): (2 overloads) Determine whether a set of objects acts as a linear sequence. That is there is a first object which is allowed to have inputs not in the set, a last object which is allowed to have outputs not in the set, and zero or more objects in between which only connect to their immediate neighbours on either side. Furthermore groups are allowed to exist, but only if all their contained objects are present within the sequence.
- [SortCausally](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/sortcausally.md): Sort a set of objects using their causal connections.
- [SubsetTopology](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/subsettopology.md): (2 overloads) Measure the topology class for the subset of objects represented by the ids.
- [WithoutRelays](https://developer.rhino3d.com/api/gh2/type/grasshopper2.doc.connectivity/withoutrelays.md): Create a new connectivity not containing (certain) relay objects.
