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

# setModelFileURL(_:for:)

Associates a URL to the given object category.

```
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

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.

---

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)