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

# setModelFileURL(_:for:)

Associates a URL to the given attributes.

## Declaration

```swift
mutating func setModelFileURL(_ url: URL?, for attributes: [any CapturedRoomAttribute]) throws
```

## Parameters

- `url`: A URL to a 3D model.
- `attributes`: An array of attributes that represents a unique combination to which to associate the URL.

## Discussion

Discussion In error conditions, this function throws: CapturedRoom.ModelProvider.Error.nonExistingFile(url:) if a 3D model doesn’t exist at the given URL. CapturedRoom.ModelProvider.Error.attributeCombinationNotSupported if no object category supports all of the argument attributes. Query supportedCombinations to check the attributes that a category supports.

## 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:)-4law9.md)
