---
title: "replaceTarget(_:with:)"
framework: usdkit
role: symbol
role_heading: Instance Method
path: "usdkit/usdprim/relationship/spec/replacetarget(_:with:)"
---

# replaceTarget(_:with:)

Replaces an authored target path with a new path.

## Declaration

```swift
func replaceTarget(_ oldPath: USDLayer.Path, with newPath: USDLayer.Path)
```

## Parameters

- `oldPath`: The existing target path.
- `newPath`: The replacement target path.
