<?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: Initialdirectory does not function with ShowOpen in Inventor Programming Forum</title>
    <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8052635#M88167</link>
    <description>&lt;P&gt;So the ShowOpen works fine there. The ShowOpen and ShowSave will display the dialog with different caption and use the Open dialog for Save would confuse users. A workaround now for the ShowSave is to specify the FileName property with a default filename for it, then it will direct to the folder you specify, try below VBA sample and let me if it is acceptable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub TestFileDialogSample()
 ' Create a new FileDialog object.
 Dim oFileDlg As FileDialog
 Call ThisApplication.CreateFileDialog(oFileDlg)

 ' Define the filter for file type.
 oFileDlg.Filter = "Config Files (*.xml)|*.xml"

 ' Save the file to the C:\Temp\ and set a default name for it.
 oFileDlg.FileName = "C:\Temp\DefaultFileName"
 
 ' Show the save dialog.
 oFileDlg.ShowSave
 End Sub&lt;/PRE&gt;</description>
    <pubDate>Thu, 07 Jun 2018 08:58:33 GMT</pubDate>
    <dc:creator>YuhanZhang</dc:creator>
    <dc:date>2018-06-07T08:58:33Z</dc:date>
    <item>
      <title>Initialdirectory does not function with ShowOpen</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8045464#M88161</link>
      <description>&lt;P&gt;All is in the subject !&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In 2007,&lt;/STRONG&gt; this was identified as "High priority issue" :&lt;A title="See this thread" href="https://forums.autodesk.com/t5/inventor-customization/iv2008-sp1-ofiledialog-showsave-does-not-honor-the/m-p/2044244" target="_blank"&gt;&amp;nbsp;https://forums.autodesk.com/t5/inventor-customization/iv2008-sp1-ofiledialog-showsave-does-not-honor-the/m-p/2044244&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In Inv 2009&lt;/STRONG&gt;, it was not solved.&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In Inv 2010&lt;/STRONG&gt;, it was announced to be solved, but not... :&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/vba-filedialog-object-problem-with-initialdirectory/m-p/2550148" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/vba-filedialog-object-problem-with-initialdirectory/m-p/2550148&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;In 2017&lt;/STRONG&gt;, Autodesk is still working on it... :&amp;nbsp;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/file-dialog-initial-directory-stuck-on-workspace/m-p/6883307" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/file-dialog-initial-directory-stuck-on-workspace/m-p/6883307&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can we expect it will be solved one day ?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;PS : Sorry, I had not seen that it had only been more than 10 years since this had been identified as a "high priority issue".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 04 Jun 2018 17:06:02 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8045464#M88161</guid>
      <dc:creator>TONELLAL</dc:creator>
      <dc:date>2018-06-04T17:06:02Z</dc:date>
    </item>
    <item>
      <title>Re: Initialdirectory does not function with ShowOpen</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8046721#M88162</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/572775"&gt;@TONELLAL&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As mentioned in the below forum discussion, FileDialog.InitialDirectory is ignored if assembly or part is open. If no document is opened and try to run below code, it recognizes mentioned directory as InitialDirectory.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://forums.autodesk.com/t5/inventor-customization/file-dialog-initial-directory-stuck-on-workspace/m-p/6883992#M70273" target="_blank"&gt;https://forums.autodesk.com/t5/inventor-customization/file-dialog-initial-directory-stuck-on-workspace/m-p/6883992#M70273&lt;/A&gt;&lt;/P&gt;
&lt;PRE&gt;Public Sub CreateFileDialog()

    Dim dlg As FileDialog
    Call ThisApplication.CreateFileDialog(dlg)
    
    dlg.InitialDirectory = "C:\Temp"
    dlg.Filter = "Inventor Files (*.ipt)|*.ipt | Assembly File (*.iam)|*.iam"
    dlg.DialogTitle = "Save Native"
    
    Call dlg.ShowOpen

End Sub		&lt;/PRE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 07:19:29 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8046721#M88162</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-06-05T07:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: Initialdirectory does not function with ShowOpen</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8047201#M88163</link>
      <description>&lt;P&gt;The problem is I work on a file, so mandatory open, and in the workflow I need to open a config file (not Inventor file). Do you have a workaround in this case ? And when do you think the problem will be solved ?&lt;/P&gt;</description>
      <pubDate>Tue, 05 Jun 2018 11:05:49 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8047201#M88163</guid>
      <dc:creator>TONELLAL</dc:creator>
      <dc:date>2018-06-05T11:05:49Z</dc:date>
    </item>
    <item>
      <title>Re: Initialdirectory does not function with ShowOpen</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8050049#M88164</link>
      <description>&lt;P&gt;Can you let me which Inventor build do you use, and provide a snippet of VBA code to reproduce the problem? From your description you want to open a non-Inventor file when some document is open already, so can you try below VBA code if it works there(make sure to change the InitialDirectory)&amp;nbsp;:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub TestFileDialogSample()
 ' Create a new FileDialog object.
 Dim oFileDlg As FileDialog
 Call ThisApplication.CreateFileDialog(oFileDlg)

 ' Define the filter to select part and assembly files or any file.
 oFileDlg.Filter = "Config Files (*.xml)|*.xml"
 oFileDlg.InsertMode = False

 ' Set the initial directory that will be displayed in the dialog.
 oFileDlg.InitialDirectory = "C:\Temp"

 ' Show the open dialog.
 oFileDlg.ShowOpen
 End Sub&lt;/PRE&gt;</description>
      <pubDate>Wed, 06 Jun 2018 10:43:19 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8050049#M88164</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2018-06-06T10:43:19Z</dc:date>
    </item>
    <item>
      <title>Re: Initialdirectory does not function with ShowOpen</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8050951#M88165</link>
      <description>&lt;P&gt;Here's the code I use :&lt;/P&gt;&lt;PRE&gt;Sub test()

Dim oFileDlg As FileDialog
Set oFileDlg = Nothing

templatesPath = ThisApplication.DesignProjectManager.ActiveDesignProject.templatesPath

Call ThisApplication.CreateFileDialog(oFileDlg)

oFileDlg.DialogTitle = "Save config file"
oFileDlg.Filter = "XML Files (*.xml)|*.xml"
oFileDlg.InitialDirectory = templatesPath
oFileDlg.CancelError = True
oFileDlg.InsertMode = False
'oFileDlg.ShowSave
oFileDlg.ShowOpen

End Sub&lt;/PRE&gt;&lt;P&gt;It works fine since I added "oFileDlg.InsertMode = False".&lt;/P&gt;&lt;P&gt;Now I have the same problem with ShowSave... InsertMode does nothing in this case ...&lt;/P&gt;&lt;P&gt;Since the dialog box itself does nothing, is it possible to use ShowOpen only to display a dialog box, but to save the file after ? What is the différence between ShowSave and ShowOpen ?&lt;/P&gt;&lt;P&gt;Inventor I use is 2016.2.3 build 236&lt;/P&gt;</description>
      <pubDate>Wed, 06 Jun 2018 16:00:35 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8050951#M88165</guid>
      <dc:creator>TONELLAL</dc:creator>
      <dc:date>2018-06-06T16:00:35Z</dc:date>
    </item>
    <item>
      <title>Re: Initialdirectory does not function with ShowOpen</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8052324#M88166</link>
      <description>&lt;P&gt;&lt;a href="https://forums.autodesk.com/t5/user/viewprofilepage/user-id/572775"&gt;@TONELLAL&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;oFileDlg.InsertMode&amp;nbsp;Property is related to ShowOpen method. For more details, go through below Inventor API documentation link.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-CA065814-A0F7-429D-A097-8E14D71D6C56" target="_blank"&gt;http://help.autodesk.com/view/INVNTOR/2018/ENU/?guid=GUID-CA065814-A0F7-429D-A097-8E14D71D6C56&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks and regards,&lt;/P&gt;</description>
      <pubDate>Thu, 07 Jun 2018 06:04:36 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8052324#M88166</guid>
      <dc:creator>chandra.shekar.g</dc:creator>
      <dc:date>2018-06-07T06:04:36Z</dc:date>
    </item>
    <item>
      <title>Re: Initialdirectory does not function with ShowOpen</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8052635#M88167</link>
      <description>&lt;P&gt;So the ShowOpen works fine there. The ShowOpen and ShowSave will display the dialog with different caption and use the Open dialog for Save would confuse users. A workaround now for the ShowSave is to specify the FileName property with a default filename for it, then it will direct to the folder you specify, try below VBA sample and let me if it is acceptable:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;Sub TestFileDialogSample()
 ' Create a new FileDialog object.
 Dim oFileDlg As FileDialog
 Call ThisApplication.CreateFileDialog(oFileDlg)

 ' Define the filter for file type.
 oFileDlg.Filter = "Config Files (*.xml)|*.xml"

 ' Save the file to the C:\Temp\ and set a default name for it.
 oFileDlg.FileName = "C:\Temp\DefaultFileName"
 
 ' Show the save dialog.
 oFileDlg.ShowSave
 End Sub&lt;/PRE&gt;</description>
      <pubDate>Thu, 07 Jun 2018 08:58:33 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8052635#M88167</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2018-06-07T08:58:33Z</dc:date>
    </item>
    <item>
      <title>Re: Initialdirectory does not function with ShowOpen</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8068012#M88168</link>
      <description>&lt;P&gt;Ok, it functions !&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Alain&lt;/P&gt;</description>
      <pubDate>Thu, 14 Jun 2018 11:42:54 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8068012#M88168</guid>
      <dc:creator>TONELLAL</dc:creator>
      <dc:date>2018-06-14T11:42:54Z</dc:date>
    </item>
    <item>
      <title>Re: Initialdirectory does not function with ShowOpen</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8069973#M88169</link>
      <description>&lt;P&gt;Thanks for the feedback.&lt;/P&gt;</description>
      <pubDate>Fri, 15 Jun 2018 02:22:50 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8069973#M88169</guid>
      <dc:creator>YuhanZhang</dc:creator>
      <dc:date>2018-06-15T02:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Initialdirectory does not function with ShowOpen</title>
      <link>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8259268#M88170</link>
      <description>&lt;P&gt;Your posting helped me to get around my issue I had in my other posting. Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 11 Sep 2018 07:46:08 GMT</pubDate>
      <guid>https://forums.autodesk.com/t5/inventor-programming-forum/initialdirectory-does-not-function-with-showopen/m-p/8259268#M88170</guid>
      <dc:creator>RoyWickrama_RWEI</dc:creator>
      <dc:date>2018-09-11T07:46:08Z</dc:date>
    </item>
  </channel>
</rss>

