<!--
{
  "availability" : [
    "iOS: 17.0.0 -",
    "iPadOS: 17.0.0 -",
    "macCatalyst: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "RoomPlan",
  "identifier" : "/documentation/RoomPlan/CapturedRoom/ModelProvider/modelFileURL(for:)-96rvb",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "RoomPlan"
    ],
    "preciseIdentifier" : "s:8RoomPlan08CapturedA0V13ModelProviderV12modelFileURL3for10Foundation0H0VSgAC6ObjectV_tKF"
  },
  "title" : "modelFileURL(for:)"
}
-->

# modelFileURL(for:)

Provides a URL to a 3D model based on the given object’s attributes or category.

```
func modelFileURL(for object: CapturedRoom.Object) throws -> URL?
```

## Parameters

`object`

The object whose attributes and category represent criteria for the model-URL query.

## Return Value

The 3D model that the app associates to the given object’s attributes via [`setModelFileURL(_:for:)`](/documentation/RoomPlan/CapturedRoom/ModelProvider/setModelFileURL(_:for:)-8xio) or its category via [`setModelFileURL(_:for:)`](/documentation/RoomPlan/CapturedRoom/ModelProvider/setModelFileURL(_:for:)-4law9); or, `nil` if no 3D model URL associates to the given object’s category or combination of attributes.

## Discussion

In error conditions, this function throws:

- [`CapturedRoom.ModelProvider.Error.nonExistingFile(url:)`](/documentation/RoomPlan/CapturedRoom/ModelProvider/Error/nonExistingFile(url:)) if a 3D model doesn’t exist at the given URL.
- [`CapturedRoom.ModelProvider.Error.attributeCombinationNotSupported`](/documentation/RoomPlan/CapturedRoom/ModelProvider/Error/attributeCombinationNotSupported) if no object category supports all of the argument attributes.

Query [`supportedCombinations`](/documentation/RoomPlan/CapturedRoom/Object/Category-swift.enum/supportedCombinations) to check the attributes that an object category supports.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)