<?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: What do I need to modify in the following python script in 2.7 to convert it to 3.4 used in professional: in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51050#M4054</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you get an error message?&lt;/P&gt;&lt;P&gt;The only pure python statement there is the "import arcpy" line, everything else is related to arcmap.&amp;nbsp; If it can't find arcpy, then there is an installation problem of python (which shouldn't be an issue unless you have old versions of python around and you haven't cleaned up your python paths).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 16 Dec 2014 16:52:48 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2014-12-16T16:52:48Z</dc:date>
    <item>
      <title>What do I need to modify in the following python script in 2.7 to convert it to 3.4 used in professional:</title>
      <link>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51049#M4053</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;import arcpy&lt;/P&gt;&lt;P&gt;mxd = arcpy.mapping.MapDocument("CURRENT")&lt;/P&gt;&lt;P&gt;df = arcpy.mapping.ListDataFrames(mxd, "Layers") [0]&lt;/P&gt;&lt;P&gt;df.zoomToSelectedFeatures()&lt;/P&gt;&lt;P&gt;arcpy.RefreshActiveView()&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 16:40:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51049#M4053</guid>
      <dc:creator>angelkosfiszer</dc:creator>
      <dc:date>2014-12-16T16:40:36Z</dc:date>
    </item>
    <item>
      <title>Re: What do I need to modify in the following python script in 2.7 to convert it to 3.4 used in professional:</title>
      <link>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51050#M4054</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Did you get an error message?&lt;/P&gt;&lt;P&gt;The only pure python statement there is the "import arcpy" line, everything else is related to arcmap.&amp;nbsp; If it can't find arcpy, then there is an installation problem of python (which shouldn't be an issue unless you have old versions of python around and you haven't cleaned up your python paths).&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 16:52:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51050#M4054</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-12-16T16:52:48Z</dc:date>
    </item>
    <item>
      <title>Re: What do I need to modify in the following python script in 2.7 to convert it to 3.4 used in professional:</title>
      <link>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51051#M4055</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan, thanks for your response. I used the analysis tool in pro and I am attaching the result. The python code is part of a model I am running successfully in arcmap 10.2. I am executing  the . mxd  in pro and it gives me an error in the script portion. Everything else in the model works. I installed pro on the same machine as 10.2 and I did not check where 3.4 is installed. I see where 2.7 is installed.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Dec 2014 17:05:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51051#M4055</guid>
      <dc:creator>angelkosfiszer</dc:creator>
      <dc:date>2014-12-16T17:05:28Z</dc:date>
    </item>
    <item>
      <title>Re: What do I need to modify in the following python script in 2.7 to convert it to 3.4 used in professional:</title>
      <link>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51052#M4056</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;A lot of things have changed when moving to pro, most noticeable is the mapping module being renamed to mp.&amp;nbsp; In addition, any map document will now be drilled down through the project and the individual layouts within those projects.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I was able to do is the following but it needs to be completed through the layout then map object:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;import arcpy
aprx = arcpy.mp.ArcGISProject("CURRENT")
layout1 = aprx.listLayouts('Layout')[0]
map1 = layout1.listElements('MAPFRAME_ELEMENT')[0]
map1.zoomToAllLayers(True)&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure on refreshing the dataframe but that should be a good place to start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Dec 2021 21:58:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51052#M4056</guid>
      <dc:creator>AlexanderNohe1</dc:creator>
      <dc:date>2021-12-10T21:58:26Z</dc:date>
    </item>
    <item>
      <title>Re: What do I need to modify in the following python script in 2.7 to convert it to 3.4 used in professional:</title>
      <link>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51053#M4057</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;In addition to what &lt;A href="https://community.esri.com/migrated-users/38677"&gt;Alexander Nohe&lt;/A&gt;‌ mentioned, here is a link to the documentation:&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/introduction-to-arcpy-mp.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/mapping/introduction-to-arcpy-mp.htm"&gt;Introduction to arcpy.mp—ArcPy | ArcGIS for Professionals&lt;/A&gt;‌&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;and this one is relevant too:&lt;/P&gt;&lt;P&gt;&lt;A href="http://pro.arcgis.com/en/pro-app/arcpy/mapping/migratingfrom10xarcpymapping.htm" title="http://pro.arcgis.com/en/pro-app/arcpy/mapping/migratingfrom10xarcpymapping.htm"&gt;Migrating arcpy.mapping to ArcGIS Pro—ArcPy | ArcGIS for Professionals&lt;/A&gt; &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 00:44:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51053#M4057</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-12-17T00:44:22Z</dc:date>
    </item>
    <item>
      <title>Re: What do I need to modify in the following python script in 2.7 to convert it to 3.4 used in professional:</title>
      <link>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51054#M4058</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i just love that projects are called *.aprx .... and the new python toolboxes are like a return to the dialog designer... this is great &lt;IMG src="https://community.esri.com/legacyfs/online/emoticons/laugh.png" /&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 17 Dec 2014 00:59:14 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51054#M4058</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-12-17T00:59:14Z</dc:date>
    </item>
    <item>
      <title>Re: What do I need to modify in the following python script in 2.7 to convert it to 3.4 used in professional:</title>
      <link>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51055#M4059</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks to y’all for your help.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 21:16:09 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51055#M4059</guid>
      <dc:creator>angelkosfiszer</dc:creator>
      <dc:date>2014-12-22T21:16:09Z</dc:date>
    </item>
    <item>
      <title>Re: What do I need to modify in the following python script in 2.7 to convert it to 3.4 used in professional:</title>
      <link>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51056#M4060</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Was your question replied? In that case you should mark the post that answer your question as "Correct Answer". Personally I believe the post by &lt;A href="https://community.esri.com/migrated-users/38677"&gt;Alexander Nohe&lt;/A&gt;‌ answered your question.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Dec 2014 23:47:27 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51056#M4060</guid>
      <dc:creator>XanderBakker</dc:creator>
      <dc:date>2014-12-22T23:47:27Z</dc:date>
    </item>
    <item>
      <title>Re: What do I need to modify in the following python script in 2.7 to convert it to 3.4 used in professional:</title>
      <link>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51057#M4061</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Xander - I agree. I went ahead and marked it correct.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 31 Dec 2014 06:44:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/what-do-i-need-to-modify-in-the-following-python/m-p/51057#M4061</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2014-12-31T06:44:17Z</dc:date>
    </item>
  </channel>
</rss>

