<?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: Extract info from an mxd file programmatically in ArcGIS API for Python Questions</title>
    <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803963#M2175</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cross posted at &lt;A href="https://community.esri.com/thread/231659-hi-all-some-years-ago-one-of-our-developers-wrote-a-python-script-to-identify-text-fields-in-the-mxd-file-and-extract-information-such-as-file-names-and-layer-names-the-script-doesnt-work-with-recent-versions-of-arcgis-what-is-the-bestofficial-way-to"&gt;https://community.esri.com/thread/231659-hi-all-some-years-ago-one-of-our-developers-wrote-a-python-script-to-identify-text-fields-in-the-mxd-file-and-extract-information-such-as-file-names-and-layer-names-the-script-doesnt-work-with-recent-versions-of-arcgis-what-is-the-bestofficial-way-to&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 05 Apr 2019 12:22:24 GMT</pubDate>
    <dc:creator>JoshuaBixby</dc:creator>
    <dc:date>2019-04-05T12:22:24Z</dc:date>
    <item>
      <title>Extract info from an mxd file programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803962#M2174</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All, some years ago one of our developers wrote a python script to identify text fields in an mxd file and extract information such as file names and layer names. The script doesn't work with recent versions/releases of ArcGIS. What is the best/official way to extract information from an mxd file programmatically on recent versions? ArcGIS API for Python? Or other API? Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2019 10:37:06 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803962#M2174</guid>
      <dc:creator>LaurenceJackson</dc:creator>
      <dc:date>2019-04-05T10:37:06Z</dc:date>
    </item>
    <item>
      <title>Re: Extract info from an mxd file programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803963#M2175</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Cross posted at &lt;A href="https://community.esri.com/thread/231659-hi-all-some-years-ago-one-of-our-developers-wrote-a-python-script-to-identify-text-fields-in-the-mxd-file-and-extract-information-such-as-file-names-and-layer-names-the-script-doesnt-work-with-recent-versions-of-arcgis-what-is-the-bestofficial-way-to"&gt;https://community.esri.com/thread/231659-hi-all-some-years-ago-one-of-our-developers-wrote-a-python-script-to-identify-text-fields-in-the-mxd-file-and-extract-information-such-as-file-names-and-layer-names-the-script-doesnt-work-with-recent-versions-of-arcgis-what-is-the-bestofficial-way-to&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2019 12:22:24 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803963#M2175</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-04-05T12:22:24Z</dc:date>
    </item>
    <item>
      <title>Re: Extract info from an mxd file programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803964#M2176</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The ArcGIS API for Python is focused on web GIS, so it isn't designed to extract information out of MXDs.&amp;nbsp; In terms of Python, ArcPy would be the API/library you want to use to extract information out of MXDs.&amp;nbsp; You could also write some ArcObjects code (.NET, Java) to extract information as well.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My guess is that the script you have uses ArcPy, if it is a Python script for accessing information in MXDs.&amp;nbsp; What isn't working with it, specifically?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2019 12:30:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803964#M2176</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-04-05T12:30:22Z</dc:date>
    </item>
    <item>
      <title>Re: Extract info from an mxd file programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803965#M2177</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you trying to use the old scripts in Pro to extract information from mxds that are part of ArcMap?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2019 13:59:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803965#M2177</guid>
      <dc:creator>MichaelVolz</dc:creator>
      <dc:date>2019-04-05T13:59:29Z</dc:date>
    </item>
    <item>
      <title>Re: Extract info from an mxd file programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803966#M2178</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank you for your responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joshua, the old scripts used to extract file paths, layer names, and CRS information. Only partial information is being returned now.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Michael, one of my colleagues tells me that you are probably right. They were old scripts in Pro reading ArcMap mxds. Sorry to be so vague but the scripts were written 7-8 years ago by a developer who left soon afterwards.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2019 16:26:02 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803966#M2178</guid>
      <dc:creator>LaurenceJackson</dc:creator>
      <dc:date>2019-04-05T16:26:02Z</dc:date>
    </item>
    <item>
      <title>Re: Extract info from an mxd file programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803967#M2179</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;ArcGIS Pro didn't exist 7-8 years ago, so these can't be "old scripts in Pro rereading ArcMap mxds."&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The ArcPy mapping module was completely rewritten from ArcMap (arcpy.mapping) to Pro (arcpy.mp).&amp;nbsp; No arcpy.mapping code will run within the Pro application or using the Pro-bundled Python interpreter because the ArcMap version of the library isn't complied for Pro.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am still not clear how you are trying to run these scripts.&amp;nbsp; But back to your original question, ArcPy is the best Python API for extracting information out of MXD or APRX files.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2019 17:07:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803967#M2179</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-04-05T17:07:23Z</dc:date>
    </item>
    <item>
      <title>Re: Extract info from an mxd file programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803968#M2180</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The arcpy.mapping &lt;A href="https://community.esri.com/space/2145"&gt;Python&lt;/A&gt; module hasn't changed much since 10.1. I'm thinking this script just isn't handling edge cases the programmer didn't code for like grouped layers etc.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 05 Apr 2019 17:48:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803968#M2180</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2019-04-05T17:48:10Z</dc:date>
    </item>
    <item>
      <title>Re: Extract info from an mxd file programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803969#M2181</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, everybody, for your responses.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Joshua, the scripts are being invoked by a Java application. I have looked at a couple of the scripts. The scripts start with an 'import arcpy.mapping' statement. Can I replace this statement with 'import arcpy.mp' and run the scripts against Pro projects?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2019 10:42:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803969#M2181</guid>
      <dc:creator>LaurenceJackson</dc:creator>
      <dc:date>2019-04-08T10:42:52Z</dc:date>
    </item>
    <item>
      <title>Re: Extract info from an mxd file programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803970#M2182</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi &lt;A href="https://community.esri.com/migrated-users/359661"&gt;Laurence Jackson&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please have a look at this&amp;nbsp;&lt;A class="link-titled" href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/migratingfrom10xarcpymapping.htm" title="https://pro.arcgis.com/en/pro-app/arcpy/mapping/migratingfrom10xarcpymapping.htm"&gt;Migrating from arcpy.mapping to ArcGIS Pro—ArcPy | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;for more information on the migration from arcpy.mapping to arcpy.mp. I don't think a simple find and replace will do...&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Egge-Jan&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2019 11:03:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803970#M2182</guid>
      <dc:creator>Egge-Jan_Pollé</dc:creator>
      <dc:date>2019-04-08T11:03:12Z</dc:date>
    </item>
    <item>
      <title>Re: Extract info from an mxd file programmatically</title>
      <link>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803971#M2183</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;arcpy.mp will definitely not read MXDs. You need to install ArcMap and have your Java script crank up python&amp;nbsp;from the ArcMap Python 2.7 executable. (For example, C:\Python27\ArcGIS10.6\python.exe.)&amp;nbsp; I'm pretty sure your code will all work if you use this Python stack, arcpy.mapping has not had big changes for a while. Most users still need both and ArcMap is not going away until 2025 so IMHO a full desktop install still really&amp;nbsp;includes both.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, if you want your script to extract paths from ArcGIS Pro projects, that will require recoding using arcpy.mp and running the python script using the Pro python environment. (C:\Program Files\ArcGIS\Pro\bin\Python\envs\arcgispro-py3\python.exe). The structure is different so some software development will be needed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 08 Apr 2019 14:37:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-api-for-python-questions/extract-info-from-an-mxd-file-programmatically/m-p/803971#M2183</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2019-04-08T14:37:27Z</dc:date>
    </item>
  </channel>
</rss>

