<?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 Extent to xy coordinate- arcpy in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/extent-to-xy-coordinate-arcpy/m-p/536582#M41987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Hellow &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt; i try to extent to xy coordinate with arcpy? i using this code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; os&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; sys&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;from&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; env&lt;BR /&gt;&lt;BR /&gt;env&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;workspace &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; r&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"C:\Project"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;pnt &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;'178434 ,662446'&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; mxdname &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;ListFiles&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"*.mxd"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;print&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; mxdname&lt;BR /&gt;&amp;nbsp; mxd &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;MapDocument&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;r&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"C:\Project\\"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; mxdname&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; df &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;ListDataFrames&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"Layers"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;)[&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;BR /&gt;&amp;nbsp; df&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;extent &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; pnt&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;print&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;'extent'&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; mxd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;save&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;()&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;del&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; mxd&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;but i get en error: ValueError: Invalid string value for Extent argument&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;any help would be great&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Jan 2015 09:10:42 GMT</pubDate>
    <dc:creator>Yaron_YosefCohen</dc:creator>
    <dc:date>2015-01-08T09:10:42Z</dc:date>
    <item>
      <title>Extent to xy coordinate- arcpy</title>
      <link>https://community.esri.com/t5/python-questions/extent-to-xy-coordinate-arcpy/m-p/536582#M41987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;Hellow &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt; i try to extent to xy coordinate with arcpy? i using this code:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;CODE style="font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: #222222;"&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; os&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; sys&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;from&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;import&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; env&lt;BR /&gt;&lt;BR /&gt;env&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;workspace &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; r&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"C:\Project"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;pnt &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;'178434 ,662446'&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;for&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; mxdname &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;in&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;ListFiles&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"*.mxd"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;):&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;print&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; mxdname&lt;BR /&gt;&amp;nbsp; mxd &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;MapDocument&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;r&lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"C:\Project\\"&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;+&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; mxdname&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;)&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; df &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; arcpy&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;mapping&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="typ" style="color: #2b91af;"&gt;ListDataFrames&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;(&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;mxd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;,&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;"Layers"&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;)[&lt;/SPAN&gt;&lt;SPAN class="lit" style="color: #953838;"&gt;0&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;]&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;BR /&gt;&amp;nbsp; df&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;extent &lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;=&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; pnt&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;print&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; &lt;/SPAN&gt;&lt;SPAN class="str" style="color: #800000;"&gt;'extent'&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&amp;nbsp; mxd&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;.&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;save&lt;/SPAN&gt;&lt;SPAN class="pun" style="color: #145680;"&gt;()&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN class="kwd" style="color: #8a4a0b;"&gt;del&lt;/SPAN&gt;&lt;SPAN class="pln" style="color: #000000;"&gt; mxd&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;&lt;SPAN class="pln" style="color: #000000;"&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;but i get en error: ValueError: Invalid string value for Extent argument&lt;/P&gt;&lt;P style="margin-bottom: 1em; color: #333333; font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; background-color: rgba(248, 248, 248, 0.6);"&gt;any help would be great&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 09:10:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extent-to-xy-coordinate-arcpy/m-p/536582#M41987</guid>
      <dc:creator>Yaron_YosefCohen</dc:creator>
      <dc:date>2015-01-08T09:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: Extent to xy coordinate- arcpy</title>
      <link>https://community.esri.com/t5/python-questions/extent-to-xy-coordinate-arcpy/m-p/536583#M41988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your extent needs to be a rectangle so you would need to find out the width and height of your data frame to be able to create an AOI from your point,&amp;nbsp; i.e. if your point is the bottom left corner:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;xmapdistance = df.extent.XMax - df.extent.XMin&lt;/P&gt;&lt;P&gt;ymapdistance = df.extent.YMax - df.extent.YMin&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;extentxmin = 178434&lt;/P&gt;&lt;P&gt;extentxmax = 178434 + xmapdistance&lt;/P&gt;&lt;P&gt;extentymax = 662446&lt;/P&gt;&lt;P&gt;extentymin = 662446 + ymapdistance&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;df.panToExtent(arcpy.Extent(extentxmin,extentymax,extentxmin,extentymax))&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Jan 2015 09:27:33 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/extent-to-xy-coordinate-arcpy/m-p/536583#M41988</guid>
      <dc:creator>AnthonyGiles</dc:creator>
      <dc:date>2015-01-08T09:27:33Z</dc:date>
    </item>
  </channel>
</rss>

