# GH_Path class

Namespace: [Grasshopper.Kernel.Data](https://developer.rhino3d.com/api/gh1/namespace/grasshopper.kernel.data.md) · Assembly: [Grasshopper](https://developer.rhino3d.com/api/gh1/assembly/grasshopper.md)

```cs
[DebuggerDisplay("{DebuggerDisplay}")]
public class GH_Path : IComparable<GH_Path>, IComparer<GH_Path>, GH_ISerializable
```

Describes the path in structure space of a data item or a list of items. A path consists of a series of integers, each one of which represents an index in a branch structure.

## Constructors

- [GH_Path](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/ctor.md): (4 overloads) Default constructor, creates a path with zero elements.

## Properties

- [DebuggerDisplay](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/debuggerdisplay.md): Gets the debugger display string for this Path instance.
- [Indices](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/indices.md): Gets or sets the entire index space; the path that identifies an element in structure space. You should not change the index space when the path is used inside a structure since it will invalidate the sort order. If you don't know what you're doing, for Pete's sake don't touch this.
- [InternalPath](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/internalpath.md): (obsolete) Gets or sets the entire index space; the path that identifies an element in structure space. You should not change the index space when the path is used inside a structure since it will invalidate the sort order. If you don't know what you're doing, for Pete's sake don't touch this.
- [Length](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/length.md): Returns the number of dimensions in the path.
- [Valid](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/valid.md): Gets whether this path is valid. Invalid paths either have no elements or negative elements.

## Indexers

- [Dimension](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/item.md): Gets or sets the value of the path at the given dimension index.

## Methods

- [AppendElement](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/appendelement.md): Create a new path by appending a new index value to this path.
- [Compare](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/compare.md): Compare two paths. This function determines the Sorting behaviour of paths.
- [CompareTo](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/compareto.md): Compare this path to another path. This function determines the Sorting behaviour of paths.
- [CullElement](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/cullelement.md): Removes the last index value from the path. If the path is already empty, nothing will happen.
- [CullFirstElement](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/cullfirstelement.md): Removes the first index value from the path. If the path is already empty, nothing will happen.
- [Format](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/format.md): Format a path.
- [FromString](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/fromstring.md): Try to deserialize a GH_Path from a String.
- [GetHashCode](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/gethashcode.md): Specialized Hash code pattern.
- [Increment](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/increment.md): (2 overloads) Increment a specific index in this path by one.
- [IsAncestor](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/isancestor.md): Test another path to see if it is an ancestor of this path. For a path to be considered an ancestor, it must share the initial dimensions.
- [IsCoincident](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/iscoincident.md): (2 overloads) Test to see if this path is coincident with another path.
- [PrependElement](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/prependelement.md): Create a new path by prepending a new index value to this path.
- [Read](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/read.md): Read this path from an archive.
- [SplitPathLikeString](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/splitpathlikestring.md): (static) Try to split up a path-like formatted string "{A;B;C}(i)" into component parts.
- [ToString](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/tostring.md): (2 overloads) Concatenates the indices in the path.
- [Write](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/write.md): Write this path to an archive.

## Operators

- [operator ==](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/op-equality.md): (static)
- [operator >](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/op-greaterthan.md): (static)
- [operator !=](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/op-inequality.md): (static)
- [operator <](https://developer.rhino3d.com/api/gh1/type/grasshopper.kernel.data.gh-path/op-lessthan.md): (static)
