<?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 Cannot open current map document in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/cannot-open-current-map-document/m-p/575683#M45098</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm new to python and I'm trying to change one of our vba scripts to python so that it will work in later versions of arcmap&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script does the following&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The user selects a polygon and presses a UI Button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A window pops up with a combobox filled with values from a access database, the user selects one and presses a 'Next' button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The scripts does a 'select by location' on all other layers, using the selected polygon.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The data from the access database and the layers is exported to an excel report.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far I have the window popping up with the data of the access database,&amp;nbsp; I can select one and export it to the excel report.&amp;nbsp; But when I try using the current map document I'm getting an error 'cannot open map document'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument("CURRENT")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script is running in the foreground.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What could be the problem? I'm stuck here&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 29 Jul 2011 07:15:54 GMT</pubDate>
    <dc:creator>LobkeDeblaere</dc:creator>
    <dc:date>2011-07-29T07:15:54Z</dc:date>
    <item>
      <title>Cannot open current map document</title>
      <link>https://community.esri.com/t5/python-questions/cannot-open-current-map-document/m-p/575683#M45098</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'm new to python and I'm trying to change one of our vba scripts to python so that it will work in later versions of arcmap&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script does the following&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The user selects a polygon and presses a UI Button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;A window pops up with a combobox filled with values from a access database, the user selects one and presses a 'Next' button&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The scripts does a 'select by location' on all other layers, using the selected polygon.&amp;nbsp; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The data from the access database and the layers is exported to an excel report.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So far I have the window popping up with the data of the access database,&amp;nbsp; I can select one and export it to the excel report.&amp;nbsp; But when I try using the current map document I'm getting an error 'cannot open map document'&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument("CURRENT")&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The script is running in the foreground.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;What could be the problem? I'm stuck here&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jul 2011 07:15:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/cannot-open-current-map-document/m-p/575683#M45098</guid>
      <dc:creator>LobkeDeblaere</dc:creator>
      <dc:date>2011-07-29T07:15:54Z</dc:date>
    </item>
  </channel>
</rss>

