<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: How can I open the Import File dialog from within a script in VRED Forum</title>
    <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11728721#M1486</link>
    <description>&lt;P&gt;Thank you!&lt;BR /&gt;As you might guess, I'm new to VRED Scripts. Sorry if I ask dumb questions.&lt;/P&gt;&lt;P&gt;I have two problems if I try to execute this:&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&lt;SPAN&gt;NameError: name 'vrScenegraphService' is not defined. Do I have to import a module for this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- If I execute only&amp;nbsp;vrGUIService.openImportDialog(['C:/TEMP/*.wire']), I get the import dialog, but without the file selection Windows window.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would it be possible to emulate the same behaviour as if I would click on Import&amp;nbsp;in the main VRED interface?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(First the the file selection and then the import dialog.)&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Fri, 03 Feb 2023 22:01:05 GMT</pubDate>
    <dc:creator>steve_k2400</dc:creator>
    <dc:date>2023-02-03T22:01:05Z</dc:date>
    <item>
      <title>How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11728157#M1484</link>
      <description>&lt;P&gt;Hi!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to open the import dialog window from within a script?&lt;/P&gt;&lt;P&gt;vrGUIService.openImportDialog(file)&lt;/P&gt;&lt;P&gt;needs a file but I don't have a file yet.&lt;/P&gt;&lt;P&gt;I would like to import Alias Files (I don't know which ones at script start) from a script and I don't wan't to construct the import window myself.&lt;/P&gt;&lt;P&gt;Can someone show a sample script how to do this? Thanks.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 17:59:48 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11728157#M1484</guid>
      <dc:creator>steve_k2400</dc:creator>
      <dc:date>2023-02-03T17:59:48Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11728369#M1485</link>
      <description>Hello,&lt;BR /&gt;&lt;BR /&gt;This will open the import dialog window...&lt;BR /&gt;vrGUIService.openImportDialog(['C:/TEMP/*.wire'], vrScenegraphService.getRootNode())&lt;BR /&gt;</description>
      <pubDate>Fri, 03 Feb 2023 19:16:26 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11728369#M1485</guid>
      <dc:creator>__daniel.lincoln__</dc:creator>
      <dc:date>2023-02-03T19:16:26Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11728721#M1486</link>
      <description>&lt;P&gt;Thank you!&lt;BR /&gt;As you might guess, I'm new to VRED Scripts. Sorry if I ask dumb questions.&lt;/P&gt;&lt;P&gt;I have two problems if I try to execute this:&lt;/P&gt;&lt;P&gt;-&amp;nbsp;&lt;SPAN&gt;NameError: name 'vrScenegraphService' is not defined. Do I have to import a module for this?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;- If I execute only&amp;nbsp;vrGUIService.openImportDialog(['C:/TEMP/*.wire']), I get the import dialog, but without the file selection Windows window.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Would it be possible to emulate the same behaviour as if I would click on Import&amp;nbsp;in the main VRED interface?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;(First the the file selection and then the import dialog.)&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Fri, 03 Feb 2023 22:01:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11728721#M1486</guid>
      <dc:creator>steve_k2400</dc:creator>
      <dc:date>2023-02-03T22:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11729571#M1487</link>
      <description>&lt;P&gt;Hi, you can add:&lt;/P&gt;
&lt;P&gt;QFileDialog.getOpenFileName(None, "Select File", "&amp;lt;your file path&amp;gt;", "*.wire") for a single file selection&lt;/P&gt;
&lt;P&gt;or&lt;/P&gt;
&lt;P&gt;QFileDialog.getOpenFileNames(None, "Select Files", "&amp;lt;your file path&amp;gt;", "*.wire") for a multiple selection.&lt;/P&gt;
&lt;P&gt;the use the&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10728835"&gt;@__daniel.lincoln__&lt;/a&gt;&amp;nbsp; code passing the selected file.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;selectedFile = QFileDialog.getOpenFileName(None, "Select File", "&amp;lt;your file path&amp;gt;", "*.wire")
vrGUIService.openImportDialog(selectedFile, vrScenegraphService.getRootNode())

# or 

selectedFiles = QFileDialog.getOpenFileNames(None, "Select Files", "&amp;lt;your file path&amp;gt;", "*.wire")
vrGUIService.openImportDialog(selectedFiles, vrScenegraphService.getRootNode())

&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;if use them in a scriptplugin you have to import both QFileDialog&amp;nbsp;and&amp;nbsp;&lt;SPAN&gt;vrScenegraphService with&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;import&amp;nbsp;vrScenegraphService&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;from PySide2 import QtCore, QtGui, QtWidgets&lt;BR /&gt;from PySide2.QtWidgets import QFileDialog&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Check&amp;nbsp; the VRED python help for more information, and the QT Help for the dialog&lt;/P&gt;
&lt;P&gt;&lt;A href="https://doc.qt.io/qt-6/qfiledialog.html" target="_blank"&gt;https://doc.qt.io/qt-6/qfiledialog.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;i didn't test the code provided.... so check it when you use it&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 10:50:57 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11729571#M1487</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2023-02-04T10:50:57Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11730001#M1488</link>
      <description>&lt;P&gt;Hi and thank you!&amp;nbsp;&lt;/P&gt;&lt;P&gt;We are getting closer.&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":smiling_face_with_smiling_eyes:"&gt;😊&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Importing the Qt modules works and so the File Selector Window shows up.&lt;/P&gt;&lt;P&gt;Importing&amp;nbsp;&lt;STRONG&gt;vrScenegraphService &lt;/STRONG&gt;throws an error:&amp;nbsp;&amp;nbsp;&lt;EM&gt;ModuleNotFoundError: No module named 'vrScenegraphService'&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Without importing it, it can't find it:&lt;EM&gt;&amp;nbsp;&lt;/EM&gt;&lt;/SPAN&gt;&lt;EM&gt;NameError: name 'vrScenegraphService' is not defined&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;If I leave out&amp;nbsp;&lt;STRONG&gt;vrScenegraphService&amp;nbsp;&lt;/STRONG&gt;it kind of works but there is another Problem:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;In the Import dialog there are now two entries. The previously&amp;nbsp;&lt;STRONG&gt;selected&lt;/STRONG&gt; &lt;STRONG&gt;file&lt;/STRONG&gt; &lt;U&gt;and&lt;/U&gt; "&lt;STRONG&gt;*.wire"&lt;/STRONG&gt;.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&lt;STRONG&gt;*.wire&lt;/STRONG&gt; can't be imported so either the import stops with an error or *.wire has to be manually removed first which is not very satisfying in a script.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I'm experimenting in the Script window currently. It's not yet a plugin.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Thanks for any help!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 04 Feb 2023 17:13:45 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11730001#M1488</guid>
      <dc:creator>steve_k2400</dc:creator>
      <dc:date>2023-02-04T17:13:45Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11730949#M1489</link>
      <description>&lt;P&gt;Which Vred version are you using?&amp;nbsp;&lt;STRONG&gt;vrScenegraphService&amp;nbsp;&lt;/STRONG&gt;if i think is only in the 2023.3. If older Try to use vrScenegraph without importing it, while you are working in the script editor.&lt;/P&gt;
&lt;P&gt;for the file double entry, could you share the code you wrote?&lt;/P&gt;
&lt;P&gt;best&lt;/P&gt;
&lt;P&gt;chris&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 10:51:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11730949#M1489</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2023-02-05T10:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11731099#M1490</link>
      <description>&lt;P&gt;I'm not in the company today so I&amp;nbsp; can only look tomorrow but I think we have V2022.&lt;/P&gt;&lt;P&gt;I will test your suggestion tomorrow and get back to you.&lt;/P&gt;&lt;P&gt;Thanks and have a nice Sunday,&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Steve&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sun, 05 Feb 2023 13:50:20 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11731099#M1490</guid>
      <dc:creator>steve_k2400</dc:creator>
      <dc:date>2023-02-05T13:50:20Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11732587#M1491</link>
      <description>&lt;P&gt;We have VRED 2022.2&lt;/P&gt;&lt;P&gt;I could solve the issue with the double entry by replacing "*.wire" with an empty "")&lt;/P&gt;&lt;P&gt;This way only the selected file is shown in the Import Dialog.&lt;/P&gt;&lt;P&gt;(With the drawback that it shows all files not just wires, but I can live with that.)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this older VRED version the openImportDialog seems to require only one argument.&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I try to put&amp;nbsp;&lt;SPAN&gt;vrScenegraph.getRootNode() as second argument it complains:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;TypeError: openImportDialog() takes exactly one argument (2 given)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Without the getRootNode this code seems to work.&lt;/SPAN&gt;&lt;/P&gt;&lt;LI-CODE lang="general"&gt;from PySide2 import QtCore, QtGui, QtWidgets
from PySide2.QtWidgets import QFileDialog

selectedFile = QFileDialog.getOpenFileName(None, "Select File", "C:\", "")
vrGUIService.openImportDialog(selectedFile)&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 10:27:42 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11732587#M1491</guid>
      <dc:creator>steve_k2400</dc:creator>
      <dc:date>2023-02-06T10:27:42Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11733089#M1492</link>
      <description>&lt;P&gt;Hi, be careful with the "\". in python \ is a special char, so you have to double it if you want to use it or just use the "/".&lt;/P&gt;
&lt;P&gt;but this is not your fault&lt;/P&gt;
&lt;P&gt;Checking what return from&amp;nbsp;QFileDialog.getOpenFileName and&amp;nbsp;QFileDialog.getOpenFileNames, i saw that you have do differentiate your script&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;from PySide2 import QtCore, QtGui, QtWidgets
from PySide2.QtWidgets import QFileDialog

selectedFile = QFileDialog.getOpenFileName(None, "Select File", "C:\\", "*.wire")
print(selectedFile[0])
vrGUIService.openImportDialog([selectedFile[0]])

# OR
selectedFiles = QFileDialog.getOpenFileNames(None, "Select File", "C:\\", "*.wire")
print(selectedFiles[0])
vrGUIService.openImportDialog(selectedFiles[0])
&lt;/LI-CODE&gt;
&lt;P&gt;For the&amp;nbsp;openImportDialog you are right. in the 2022 you have to pass only the file selection&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 13:56:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11733089#M1492</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2023-02-06T13:56:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11733224#M1493</link>
      <description>&lt;P&gt;I see now! Thank you, I really appreciate it!&lt;/P&gt;&lt;P&gt;I didn't realise that it could be an array.&lt;/P&gt;&lt;P&gt;Now it works as intended. Fantastic, thanks!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 14:35:05 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11733224#M1493</guid>
      <dc:creator>steve_k2400</dc:creator>
      <dc:date>2023-02-06T14:35:05Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11733334#M1494</link>
      <description>&lt;P&gt;Now that it works, I see another problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is there a way to stop the script execution until the import is completely finished.&lt;/P&gt;&lt;P&gt;Currently my script continues as soon as the ImportDialog is displayed but it should wait until the import is finished and process the imported data.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I guess for a script it gets now too complicated...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 15:24:47 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11733334#M1494</guid>
      <dc:creator>steve_k2400</dc:creator>
      <dc:date>2023-02-06T15:24:47Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11734140#M1495</link>
      <description>&lt;P&gt;Oh, that could be a very different approach...&lt;/P&gt;
&lt;P&gt;Try to explain all that you want to do with your script, just to have a better view of all the process.&lt;/P&gt;
&lt;P&gt;You can start from&lt;/P&gt;
&lt;P&gt;&amp;nbsp;vrFileIO.load(filename, filenames, parent, newFile, showImportOptions) instead of&amp;nbsp;vrGUIService.openImportDialog&lt;/P&gt;
&lt;P&gt;See the Api V1 help for more info&lt;/P&gt;
&lt;P&gt;Then you can go on with your code.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 20:09:56 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11734140#M1495</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2023-02-06T20:09:56Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11734359#M1496</link>
      <description>&lt;P&gt;It's actually a very simple little Script which is already working.&lt;/P&gt;&lt;P&gt;Import an Alias file into a VRED template file and then comes the script: rename all of the Alias Material names according to a translation table (out of a text file) and apply a material asset over the renamed materials.&lt;/P&gt;&lt;P&gt;It works fine. The only problem is, that the script doesn't know which geometry belongs to the template file (no change on those materials) and which to the Alias file.&lt;/P&gt;&lt;P&gt;In the current form, I have to assume that all geometry in the template file have VRED materials which are in the translation table and so I can find and safely ignore them. If the template file creator doesn't follow the rules, then the assumption no longer works...&lt;/P&gt;&lt;P&gt;I wrote an Alias data visualization Add-On for Blender (via FBX) where I load the FBX files from within the Add-On (a bit more complex Python script) and this way I know exactly what came out of the Alias file.&lt;/P&gt;&lt;P&gt;I wanted to do quickly something similar here but my knowledge of the VRED API is far away from what I know of the Blender API.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I assumed that I can call a comfortable file browser the same way but I didn't expected a parallel execution.&lt;/P&gt;&lt;P&gt;I don't have the time to work myself into the the VRED API, so if it's too complicated, I will give up on it.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Feb 2023 21:34:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11734359#M1496</guid>
      <dc:creator>steve_k2400</dc:creator>
      <dc:date>2023-02-06T21:34:29Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11735333#M1497</link>
      <description>&lt;P&gt;Hi, the Import phase in Vred is via parallel thread. i don't remember if the new api i wrote (vrFileIO.Load) is synchronous or not. You have to try.&lt;/P&gt;
&lt;P&gt;For the imported data to manage with a new Vred is easier. The new parameter that&amp;nbsp;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/10728835"&gt;@__daniel.lincoln__&lt;/a&gt;&amp;nbsp; put (the parent node) is useful to manage that.just create a new node an import your data inside it.&lt;/P&gt;
&lt;P&gt;Also the&amp;nbsp;&lt;SPAN&gt;vrFileIO.load(filename, filenames, parent, newFile, showImportOptions) has the Parent parameter in the 2023. You could check in the 2022 api help.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;Then manage all that is inside that node&lt;/P&gt;
&lt;P&gt;Or you can try to manage the references. While importing the Wire file it should maintain the reference with the original file. So once imported, scan the the tree to find the node with the reference to that file.&lt;/P&gt;
&lt;P&gt;And then work on that tree.&lt;/P&gt;
&lt;LI-CODE lang="general"&gt;from PySide2 import QtCore, QtGui, QtWidgets
from PySide2.QtWidgets import QFileDialog

selectedFile = QFileDialog.getOpenFileName(None, "Select File", "C:\\", "*.iam")
print(selectedFile[0])
# vrGUIService.openImportDialog([selectedFile[0]])
importedParent = findNode("Imported Data")
imported = vrFileIO.load([selectedFile[0]], importedParent, False, False)
print(imported)
print(importedParent.getNChildren())&lt;/LI-CODE&gt;
&lt;P&gt;With the&amp;nbsp;&lt;SPAN&gt;showImportOptions False the execution is synchronous. if you have to put it to True, just add a Loop to wait until the importParent node has some child. it should work.&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I don't think it will be too difficult. just take some time to read the Api docs.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Best&lt;/P&gt;
&lt;P&gt;Chris&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 07:33:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11735333#M1497</guid>
      <dc:creator>Christian_Garimberti</dc:creator>
      <dc:date>2023-02-07T07:33:36Z</dc:date>
    </item>
    <item>
      <title>Re: How can I open the Import File dialog from within a script</title>
      <link>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11736176#M1498</link>
      <description>&lt;P&gt;Thank you! I will try to find some time to read a bit more of the API and then test "around".&lt;/P&gt;&lt;P&gt;I think at the end I will probably postpone it until we also get VRED 2023 as it doesn't really makes sense to invest a lot of time in a 2022 script which might not work under 2023.&lt;/P&gt;&lt;P&gt;Thanks anyway for your time and help. I really appreciate it!&amp;nbsp;&lt;span class="lia-unicode-emoji" title=":thumbs_up:"&gt;👍&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Feb 2023 13:27:59 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/vred-forum/how-can-i-open-the-import-file-dialog-from-within-a-script/m-p/11736176#M1498</guid>
      <dc:creator>steve_k2400</dc:creator>
      <dc:date>2023-02-07T13:27:59Z</dc:date>
    </item>
  </channel>
</rss>

