---
title: "modelFileURL(for:)"
framework: roomplan
role: symbol
role_heading: Instance Method
path: "roomplan/capturedroom/modelprovider/modelfileurl(for:)-58ykp"
---

# modelFileURL(for:)

Provides a URL to the 3D model for the given attributes.

## Declaration

```swift
func modelFileURL(for attributes: [any CapturedRoomAttribute]) throws -> URL?
```

## Parameters

- `attributes`: An array of attributes that represent criteria for the model-URL query.

## Return Value

Return Value The 3D model that the app associates to the given object’s attributes via setModelFileURL(_:for:). If no 3D model URL associates to the given attribute combination, this function returns nil.

## 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 an object 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)
- [setModelFileURL(_:for:)](roomplan/capturedroom/modelprovider/setmodelfileurl(_:for:)-8xio.md)
- [setModelFileURL(_:for:)](roomplan/capturedroom/modelprovider/setmodelfileurl(_:for:)-4law9.md)
