---
title: clearSelection()
framework: usdkit
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+]
path: usdkit/usdprim/variantset/clearselection()
---

# clearSelection()

Clears the variant selection.

## Declaration

```swift
func clearSelection() throws
```

## Discussion

Discussion note: An error if the selection cannot be cleared.
