<?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 Set path for file open command programmatically in ArcObjects SDK Questions</title>
    <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755899#M20044</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on a python addin for ArcGIS 10.2.2 and I would like to set the default path for the "file open" command to a user-specified location after a script tool executes.&amp;nbsp; One of the functions that my addin performs is to launch a script tool that copies some .mxd's to a user-specified location.&amp;nbsp; I would like to use that location as the default path, so users can access the other mxd's that were copied by the tool without having to navigate to that folder.&amp;nbsp; I have used the comtypes module to get a reference to the current document, and it seems I can wrap any of the ArcObjects interfaces I will need.&amp;nbsp; Is there a way to access the property that the Open command uses to open the explorer window?&amp;nbsp; Any suggestions about where to start digging into ArcObjects would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 02 Sep 2014 20:39:27 GMT</pubDate>
    <dc:creator>MarshallUdo</dc:creator>
    <dc:date>2014-09-02T20:39:27Z</dc:date>
    <item>
      <title>Set path for file open command programmatically</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755899#M20044</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am working on a python addin for ArcGIS 10.2.2 and I would like to set the default path for the "file open" command to a user-specified location after a script tool executes.&amp;nbsp; One of the functions that my addin performs is to launch a script tool that copies some .mxd's to a user-specified location.&amp;nbsp; I would like to use that location as the default path, so users can access the other mxd's that were copied by the tool without having to navigate to that folder.&amp;nbsp; I have used the comtypes module to get a reference to the current document, and it seems I can wrap any of the ArcObjects interfaces I will need.&amp;nbsp; Is there a way to access the property that the Open command uses to open the explorer window?&amp;nbsp; Any suggestions about where to start digging into ArcObjects would be appreciated.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 02 Sep 2014 20:39:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755899#M20044</guid>
      <dc:creator>MarshallUdo</dc:creator>
      <dc:date>2014-09-02T20:39:27Z</dc:date>
    </item>
    <item>
      <title>Re: Set path for file open command programmatically</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755900#M20045</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I believe that the file open dialog uses the registry value stores here;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;STRONG&gt;&lt;CODE&gt;HKEY_CURRENT_USER\Software\ESRI\ArcCatalog\Settings\LastBrowseLocation&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Take a look at &lt;A href="http://code.activestate.com/recipes/66011-reading-from-and-writing-to-the-windows-registry/"&gt;http://code.activestate.com/recipes/66011-reading-from-and-writing-to-the-windows-registry/&lt;/A&gt; on how to read/set the registry value with python.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Owain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 10:55:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755900#M20045</guid>
      <dc:creator>OwainCatton</dc:creator>
      <dc:date>2014-09-03T10:55:30Z</dc:date>
    </item>
    <item>
      <title>Re: Set path for file open command programmatically</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755901#M20046</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your reply Owain.&amp;nbsp; I looked in the registry, and on my machine (Windows Server 2008 R2 with ArcGIS 10.2.2), the LastBrowseLocation entry is here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;CODE&gt;HKEY_CURRENT_USER\Software\ESRI\Desktop10.2\ArcCatalog\Settings\LastBrowseLocation&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Unfortunately, the string doesn't match the path that opens in the open dialog.&amp;nbsp; I tried manually changing the value, and the open file dialog didn't open to the path that I specified.&amp;nbsp; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 16:26:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755901#M20046</guid>
      <dc:creator>MarshallUdo</dc:creator>
      <dc:date>2014-09-03T16:26:10Z</dc:date>
    </item>
    <item>
      <title>Re: Set path for file open command programmatically</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755902#M20047</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The entry that controls the path is here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;&lt;CODE&gt;HKEY_CURRENT_USER\Software\ESRI\Desktop10.2\ArcMap\File Path&lt;/CODE&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks to Owain for providing the example on how to change the value for this key using python.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 03 Sep 2014 23:23:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755902#M20047</guid>
      <dc:creator>MarshallUdo</dc:creator>
      <dc:date>2014-09-03T23:23:47Z</dc:date>
    </item>
    <item>
      <title>Re: Set path for file open command programmatically</title>
      <link>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755903#M20048</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Glad you found it alright, my mistake giving you the Arc Catalog registry key location.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Owain&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 04 Sep 2014 12:22:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcobjects-sdk-questions/set-path-for-file-open-command-programmatically/m-p/755903#M20048</guid>
      <dc:creator>OwainCatton</dc:creator>
      <dc:date>2014-09-04T12:22:24Z</dc:date>
    </item>
  </channel>
</rss>

