<?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: Select and Zoom Script in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/select-and-zoom-script/m-p/237230#M18435</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think your problem will be that a single point does not have an extent so you cannot zoom to it. You will have to create your own extent from the point by choosing a suitable buffer rectangle and zoom to that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sat, 02 Mar 2013 21:43:10 GMT</pubDate>
    <dc:creator>KimOllivier</dc:creator>
    <dc:date>2013-03-02T21:43:10Z</dc:date>
    <item>
      <title>Select and Zoom Script</title>
      <link>https://community.esri.com/t5/python-questions/select-and-zoom-script/m-p/237229#M18434</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi All, I am attempting to make a simple select and zoom python script for my address points. Currently the script will complete successfully but will not select or zoom to the entered point. I am using two parameters that have been set in the Script Tool. Address_Number (Long) and Address_Name (String) which both have identical spellings/data types in Properties&amp;gt;&amp;gt;Parameters&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's the code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="plain" name="code"&gt;import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd, "*")[0]
addLayer = arcpy.mapping.Layer("G:\Layers\GIS_SDE.AddressPoints.lyr")
arcpy.mapping.AddLayer(df, addLayer, "TOP")
Address_Number = arcpy.GetParameterAsText(0)
Address_Name = arcpy.GetParameterAsText(1
arcpy.SelectLayerByAttribute_management("GIS_SDE.AddressPoints", "NEW_SELECTION", "A_NBR = %Address_Number% AND ADDR = %Address_Name%")
df.zoomToSelectedFeatures() &lt;/PRE&gt;&lt;DIV style="display:none;"&gt; &lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help is appreciated.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Jordan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 01 Mar 2013 21:48:15 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-and-zoom-script/m-p/237229#M18434</guid>
      <dc:creator>JordanBaltierra</dc:creator>
      <dc:date>2013-03-01T21:48:15Z</dc:date>
    </item>
    <item>
      <title>Re: Select and Zoom Script</title>
      <link>https://community.esri.com/t5/python-questions/select-and-zoom-script/m-p/237230#M18435</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I think your problem will be that a single point does not have an extent so you cannot zoom to it. You will have to create your own extent from the point by choosing a suitable buffer rectangle and zoom to that.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 02 Mar 2013 21:43:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-and-zoom-script/m-p/237230#M18435</guid>
      <dc:creator>KimOllivier</dc:creator>
      <dc:date>2013-03-02T21:43:10Z</dc:date>
    </item>
    <item>
      <title>Re: Select and Zoom Script</title>
      <link>https://community.esri.com/t5/python-questions/select-and-zoom-script/m-p/237231#M18436</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Another option is to zoom by setting the data frame scale.&amp;nbsp; You can either hard code it or change it relatively.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;df.scale = df.scale / 2 (zoom in 2x)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Also - because you are using "current", don't forget to use arcpy.RefreshActiveView().&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Mar 2013 13:35:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/select-and-zoom-script/m-p/237231#M18436</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2013-03-04T13:35:42Z</dc:date>
    </item>
  </channel>
</rss>

