<?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 Pro: Set a Map's extent from a layer's extent via Python in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1413868#M82252</link>
    <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294768"&gt;@JohnFix1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Did you ever find a solution/workaround to the problem you were facing. I am stuck at the same stage where CreateVectorTilePackage doesn't seem to respect the extent of a mapview screen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jaivik Pathak&lt;/P&gt;</description>
    <pubDate>Tue, 23 Apr 2024 00:49:11 GMT</pubDate>
    <dc:creator>Jaivik_P</dc:creator>
    <dc:date>2024-04-23T00:49:11Z</dc:date>
    <item>
      <title>ArcGIS Pro: Set a Map's extent from a layer's extent via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1006000#M34665</link>
      <description>&lt;P&gt;in ArcGIS Pro 2.6.2 I have a map named "VTPK Output" and I want to set the map's extent to the extent of a layer called "PACKAGE_AREA" in a python script. There are other maps in my project.&lt;/P&gt;&lt;P&gt;The layer has a definition query that is set to a particular area. I will then change the query and run my script for another area, but it needs to set the map extent property. As you can image, the script is creating a vector tile cache.&lt;/P&gt;&lt;P&gt;I've written some python scripts, but I'm between novice and rookie....&lt;/P&gt;&lt;P&gt;Thanks for your help in advance.&lt;/P&gt;&lt;P&gt;John&lt;/P&gt;</description>
      <pubDate>Tue, 01 Dec 2020 21:01:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1006000#M34665</guid>
      <dc:creator>JohnFix1</dc:creator>
      <dc:date>2020-12-01T21:01:34Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro: Set a Map's extent from a layer's extent via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1006125#M34677</link>
      <description>&lt;P&gt;I'm a rookie myself with ArcGIS Pro, but I think this is done with a 'camera' object.&lt;BR /&gt;I think there's a good example/code sample here -&amp;nbsp;&lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/mapping/camera-class.htm" target="_blank"&gt;Camera—ArcGIS Pro | Documentation&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;this is 'camera sample 1':&lt;/P&gt;&lt;LI-CODE lang="python"&gt;import arcpy
aprx = arcpy.mp.ArcGISProject(r"C:\Projects\YosemiteNP\Yosemite.aprx")

m = aprx.listMaps("Yose*")[0]
lyr = m.listLayers("Ranger Stations")[0]
lyt = aprx.listLayouts("Main Attr*")[0]
mf = lyt.listElements("mapframe_element", "Yosemite National Park")[0]
mf.camera.setExtent(mf.getLayerExtent(lyr, False, True))

aprx.saveACopy(r"C:\Projects\YosemiteNP\Yosemite_Updated.aprx")
del aprx&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 02 Dec 2020 11:30:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1006125#M34677</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-12-02T11:30:41Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro: Set a Map's extent from a layer's extent via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1215246#M60138</link>
      <description>&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;I have tried this method, it does update the extent on the screen. But CreateTilePackage does not use this extent or respect the extent in the environment. It only seems to use the extent as set as a property of the map. You see this in the UX by double clicking the "map" in the Content panel-&amp;gt; Extent.&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;</description>
      <pubDate>Thu, 22 Sep 2022 19:39:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1215246#M60138</guid>
      <dc:creator>JohnFix1</dc:creator>
      <dc:date>2022-09-22T19:39:47Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro: Set a Map's extent from a layer's extent via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1413868#M82252</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.esri.com/t5/user/viewprofilepage/user-id/294768"&gt;@JohnFix1&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;&lt;P&gt;Did you ever find a solution/workaround to the problem you were facing. I am stuck at the same stage where CreateVectorTilePackage doesn't seem to respect the extent of a mapview screen.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Jaivik Pathak&lt;/P&gt;</description>
      <pubDate>Tue, 23 Apr 2024 00:49:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1413868#M82252</guid>
      <dc:creator>Jaivik_P</dc:creator>
      <dc:date>2024-04-23T00:49:11Z</dc:date>
    </item>
    <item>
      <title>Re: ArcGIS Pro: Set a Map's extent from a layer's extent via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1570180#M91425</link>
      <description>&lt;P&gt;No, I have not. I'm now at ArcGIS Pro 3.4 and thought perhaps a solution would be at this version. But I have not found one yet.&lt;/P&gt;&lt;P&gt;Any luck on your end?&lt;/P&gt;</description>
      <pubDate>Thu, 19 Dec 2024 14:51:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcgis-pro-set-a-map-s-extent-from-a-layer-s/m-p/1570180#M91425</guid>
      <dc:creator>JohnFix1</dc:creator>
      <dc:date>2024-12-19T14:51:03Z</dc:date>
    </item>
  </channel>
</rss>

