---
title: "setModelFileURL(_:for:)"
framework: roomplan
role: symbol
role_heading: Instance Method
path: "roomplan/capturedroom/modelprovider/setmodelfileurl(_:for:)-4law9"
---

# setModelFileURL(_:for:)

Associates a URL to the given object category.

## Declaration

```swift
mutating func setModelFileURL(_ url: URL?, for category: CapturedRoom.Object.Category) throws
```

## Parameters

- `url`: A URL to a 3D model.
- `category`: The object type associated with the model URL.

## Discussion

Discussion This function throws CapturedRoom.ModelProvider.Error.nonExistingFile(url:) if a 3D model doesn’t exist at the given URL.

## See Also

### Managing models

- [modelFileURLs](roomplan/capturedroom/modelprovider/modelfileurls.md)
- [modelFileURL(for:)](roomplan/capturedroom/modelprovider/modelfileurl(for:)-9irqx.md)
- [modelFileURL(for:)](roomplan/capturedroom/modelprovider/modelfileurl(for:)-96rvb.md)
- [modelFileURL(for:)](roomplan/capturedroom/modelprovider/modelfileurl(for:)-58ykp.md)
- [setModelFileURL(_:for:)](roomplan/capturedroom/modelprovider/setmodelfileurl(_:for:)-8xio.md)
