---
title: selectionIndexPath
framework: appkit
role: symbol
role_heading: Instance Property
path: appkit/nstreecontroller/selectionindexpath
---

# selectionIndexPath

The index path of the first selected object.

## Declaration

```swift
var selectionIndexPath: IndexPath? { get }
```

## Discussion

Discussion The value of this property is nil if there is no selection. This property is observable using key-value observing.

## See Also

### Getting the current selection

- [setSelectionIndexPath(_:)](appkit/nstreecontroller/setselectionindexpath(_:).md)
- [setSelectionIndexPaths(_:)](appkit/nstreecontroller/setselectionindexpaths(_:).md)
- [selectionIndexPaths](appkit/nstreecontroller/selectionindexpaths.md)
- [selectedObjects](appkit/nstreecontroller/selectedobjects.md)
- [selectedNodes](appkit/nstreecontroller/selectednodes.md)
