---
title: "replaceAll(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/lowlevelmesh/partscollection/replaceall(_:)"
---

# replaceAll(_:)

Replaces all mesh parts in this collection with those from the new sequence.

## Declaration

```swift
mutating func replaceAll<S>(_ newElements: S) where S : Sequence, S.Element == LowLevelMesh.Part
```

## Parameters

- `newElements`: The elements to replace the contents of the collection.

## See Also

### Updating collection contents

- [append(_:)](realitykit/lowlevelmesh/partscollection/append(_:).md)
- [append(contentsOf:)](realitykit/lowlevelmesh/partscollection/append(contentsof:).md)
- [removeAll()](realitykit/lowlevelmesh/partscollection/removeall().md)
