<?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: ArcGIS 9.2: can I let a Python script use the work space of the current ArcMap fi in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcgis-9-2-can-i-let-a-python-script-use-the-work/m-p/97607#M7586</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Everybody:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am writing a python script to perform data validation for data editor using ArcMap, and want to make it into a tool in ArcToolbox.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If the tool is executed from ArcMap with a MXD file open, is it possible to let it detect the active data connection in the MXD and directly use it to retrieve data?&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy.mapping&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print arcpy.mapping.MapDocument("CURRENT").filePath&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 17 Apr 2012 04:36:49 GMT</pubDate>
    <dc:creator>StephenBarrow</dc:creator>
    <dc:date>2012-04-17T04:36:49Z</dc:date>
    <item>
      <title>ArcGIS 9.2: can I let a Python script use the work space of the current ArcMap file?</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-9-2-can-i-let-a-python-script-use-the-work/m-p/97606#M7585</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Everybody:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am writing a python script to perform data validation for data editor using ArcMap, and want to make it into a tool in ArcToolbox.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If the tool is executed from ArcMap with a MXD file open, is it possible to let it detect the active data connection in the MXD and directly use it to retrieve data?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 07 Dec 2010 19:18:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-9-2-can-i-let-a-python-script-use-the-work/m-p/97606#M7585</guid>
      <dc:creator>SuiHuang</dc:creator>
      <dc:date>2010-12-07T19:18:02Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 9.2: can I let a Python script use the work space of the current ArcMap fi</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-9-2-can-i-let-a-python-script-use-the-work/m-p/97607#M7586</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;Hi Everybody:&lt;BR /&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I am writing a python script to perform data validation for data editor using ArcMap, and want to make it into a tool in ArcToolbox.&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If the tool is executed from ArcMap with a MXD file open, is it possible to let it detect the active data connection in the MXD and directly use it to retrieve data?&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Try&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import arcpy.mapping&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print arcpy.mapping.MapDocument("CURRENT").filePath&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 04:36:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-9-2-can-i-let-a-python-script-use-the-work/m-p/97607#M7586</guid>
      <dc:creator>StephenBarrow</dc:creator>
      <dc:date>2012-04-17T04:36:49Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 9.2: can I let a Python script use the work space of the current ArcMap fi</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-9-2-can-i-let-a-python-script-use-the-work/m-p/97608#M7587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Yes, but one cannot evoke arcpy from 9.2, and acgisscripting does not provide access to the arcpy.mapping module.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I do not think this can be done from Arc9.2 in python without accessing ArcObjects.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 10:54:38 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-9-2-can-i-let-a-python-script-use-the-work/m-p/97608#M7587</guid>
      <dc:creator>markdenil</dc:creator>
      <dc:date>2012-04-17T10:54:38Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS 9.2: can I let a Python script use the work space of the current ArcMap fi</title>
      <link>https://community.esri.com/t5/python-questions/arcgis-9-2-can-i-let-a-python-script-use-the-work/m-p/97609#M7588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;It should be possible to add some VBA code to either an MXD or a user's Normal.mxt that would set an environment variable to the project's source path. That variable could then be read with os.environ.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Apr 2012 11:42:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcgis-9-2-can-i-let-a-python-script-use-the-work/m-p/97609#M7588</guid>
      <dc:creator>BruceNielsen</dc:creator>
      <dc:date>2012-04-17T11:42:58Z</dc:date>
    </item>
  </channel>
</rss>

