<?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: Using &amp;quot;Same as Display&amp;quot; Extent in ArcGIS Pro script? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/using-quot-same-as-display-quot-extent-in-arcgis/m-p/1007347#M59218</link>
    <description>&lt;P class="p1"&gt;Hi Eric,&lt;/P&gt;&lt;P class="p1"&gt;You should be able to use the following snippet provided the user is running the tool from within Pro and has the map view open.&lt;/P&gt;&lt;P class="p1"&gt;Warren&lt;/P&gt;&lt;P class="p1"&gt;aprx = arcpy.mp.ArcGISProject(&lt;SPAN class="s1"&gt;&lt;STRONG&gt;"CURRENT"&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;BR /&gt;mv = aprx.activeView&lt;BR /&gt;ext = mv.camera.getExtent()&lt;BR /&gt;arcpy.env.extent = &lt;SPAN class="s1"&gt;&lt;STRONG&gt;"{}, {}, {}, {}"&lt;/STRONG&gt;&lt;/SPAN&gt;.format(ext.XMin, ext.YMin, ext.XMax, ext.YMax)&lt;/P&gt;</description>
    <pubDate>Mon, 07 Dec 2020 13:28:35 GMT</pubDate>
    <dc:creator>WarrenDavison</dc:creator>
    <dc:date>2020-12-07T13:28:35Z</dc:date>
    <item>
      <title>Using "Same as Display" Extent in ArcGIS Pro script?</title>
      <link>https://community.esri.com/t5/python-questions/using-quot-same-as-display-quot-extent-in-arcgis/m-p/618001#M48202</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The Extent geoprocessing environment setting documentation here:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://pro.arcgis.com/en/pro-app/tool-reference/environment-settings/output-extent.htm"&gt;https://pro.arcgis.com/en/pro-app/tool-reference/environment-settings/output-extent.htm&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;lists "Same as Display" under the dialog syntax, but not under the scripting syntax.&amp;nbsp; I am building a script tool that requires "Same as Display" to be set as a default.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Could someone share a snippet of code that demonstrates how I would set arcpy.env.extent to get the same effect as setting "Same as Display" in the dialog window?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Aug 2019 15:55:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-quot-same-as-display-quot-extent-in-arcgis/m-p/618001#M48202</guid>
      <dc:creator>EricEagle</dc:creator>
      <dc:date>2019-08-02T15:55:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using "Same as Display" Extent in ArcGIS Pro script?</title>
      <link>https://community.esri.com/t5/python-questions/using-quot-same-as-display-quot-extent-in-arcgis/m-p/1007347#M59218</link>
      <description>&lt;P class="p1"&gt;Hi Eric,&lt;/P&gt;&lt;P class="p1"&gt;You should be able to use the following snippet provided the user is running the tool from within Pro and has the map view open.&lt;/P&gt;&lt;P class="p1"&gt;Warren&lt;/P&gt;&lt;P class="p1"&gt;aprx = arcpy.mp.ArcGISProject(&lt;SPAN class="s1"&gt;&lt;STRONG&gt;"CURRENT"&lt;/STRONG&gt;&lt;/SPAN&gt;)&lt;BR /&gt;mv = aprx.activeView&lt;BR /&gt;ext = mv.camera.getExtent()&lt;BR /&gt;arcpy.env.extent = &lt;SPAN class="s1"&gt;&lt;STRONG&gt;"{}, {}, {}, {}"&lt;/STRONG&gt;&lt;/SPAN&gt;.format(ext.XMin, ext.YMin, ext.XMax, ext.YMax)&lt;/P&gt;</description>
      <pubDate>Mon, 07 Dec 2020 13:28:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-quot-same-as-display-quot-extent-in-arcgis/m-p/1007347#M59218</guid>
      <dc:creator>WarrenDavison</dc:creator>
      <dc:date>2020-12-07T13:28:35Z</dc:date>
    </item>
    <item>
      <title>Re: Using "Same as Display" Extent in ArcGIS Pro script?</title>
      <link>https://community.esri.com/t5/python-questions/using-quot-same-as-display-quot-extent-in-arcgis/m-p/1194943#M65054</link>
      <description>&lt;P&gt;Thanks, you rock! Cut down a process using feature services as inputs from 13 minutes to 32 seconds.&lt;/P&gt;</description>
      <pubDate>Fri, 22 Jul 2022 14:58:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/using-quot-same-as-display-quot-extent-in-arcgis/m-p/1194943#M65054</guid>
      <dc:creator>KirstenHazler</dc:creator>
      <dc:date>2022-07-22T14:58:16Z</dc:date>
    </item>
  </channel>
</rss>

