<!--
{
  "availability" : [
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "AppKit",
  "identifier" : "/documentation/AppKit/NSDocumentController/urlsFromRunningOpenPanel()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AppKit"
    ],
    "preciseIdentifier" : "c:objc(cs)NSDocumentController(im)URLsFromRunningOpenPanel"
  },
  "title" : "urlsFromRunningOpenPanel()"
}
-->

# urlsFromRunningOpenPanel()

An array of URLs that correspond to the selected files in a running Open dialog.

```
func urlsFromRunningOpenPanel() -> [URL]?
```

## Discussion

Accessing this property creates an [`NSOpenPanel`](/documentation/AppKit/NSOpenPanel) object and runs it using the [`runModalOpenPanel(_:forTypes:)`](/documentation/AppKit/NSDocumentController/runModalOpenPanel(_:forTypes:)) method. When the user dismisses the panel, the returned value is an array of URLs corresponding to the files chosen by the user. The value is `nil` if the user cancels the Open panel or makes no selection.

---

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)