# openDialog does not load node into scene

**URL:** <https://discourse.slicer.org/t/opendialog-does-not-load-node-into-scene/23874>\
**Category:** Development\
**Tags:** file-import\
**Created:** [June 14, 2022, 8:02pm UTC](https://discourse.slicer.org/t/opendialog-does-not-load-node-into-scene/23874 "2022-06-14T20:02:04Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![mholden8](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mholden8/32/1112_2.png) [@mholden8](https://discourse.slicer.org/u/mholden8)\
**Post date:** [June 14, 2022, 8:02pm UTC](https://discourse.slicer.org/t/opendialog-does-not-load-node-into-scene/23874/1 "2022-06-14T20:02:04Z")

</div>

When using the openDialog function in the Slicer IO Manager, the selected node is not loaded into the scene.

For example, when I run the code below (see [Documentation/Nightly/Developers/IO - Slicer Wiki](https://www.slicer.org/wiki/Documentation/Nightly/Developers/IO#How_to_open_a_registered_a_dialog_.3F)), nothing happens after selecting a volume file to load.

```auto
 io = slicer.app.ioManager()
 params = {}
 io.openDialog("VolumeFile", slicer.qSlicerFileDialog.Read, params)

```

Is there a new preferred way to load files using a registered dialog?

Slicer version: 5.1.0-2022-05-16  
OS: Windows 10

---

<div class="post-metadata">

**Author:** ![pieper](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/pieper/32/8_2.png) [@pieper](https://discourse.slicer.org/u/pieper)\
**Post date:** [June 14, 2022, 8:26pm UTC](https://discourse.slicer.org/t/opendialog-does-not-load-node-into-scene/23874/2 "2022-06-14T20:26:47Z")

</div>

thanks for the report. yes, that appears to be a regression. For me either the code you pasted or `slicer.util.openAddVolumeDialog()` brings up a native dialog and always returns `False`. Can you file an issue on slicer github?

As a workaround, you can do something like this:

```auto
d = qt.QFileDialog()
d.exec()
slicer.util.loadVolume(d.selectedFiles()[0])

```

---

<div class="post-metadata">

**Author:** ![mholden8](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/mholden8/32/1112_2.png) [@mholden8](https://discourse.slicer.org/u/mholden8)\
**Post date:** [June 14, 2022, 9:15pm UTC](https://discourse.slicer.org/t/opendialog-does-not-load-node-into-scene/23874/3 "2022-06-14T21:15:59Z")

</div>

Thanks for the workaround. I have filed an issue on Slicer Github here: [openDialog does not load node into scene · Issue #6429 · Slicer/Slicer · GitHub](https://github.com/Slicer/Slicer/issues/6429).
