<?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: df.ZoomToSelectedFeatures not working in Geoprocessing Questions</title>
    <link>https://community.esri.com/t5/geoprocessing-questions/df-zoomtoselectedfeatures-not-working/m-p/83133#M2853</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks! I'm never sure what is supposed to go into the brackets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i've seen examples where stuff is in there and others where it's blank. How do we know when to do what?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 Jan 2012 17:32:03 GMT</pubDate>
    <dc:creator>JoshuaChan</dc:creator>
    <dc:date>2012-01-05T17:32:03Z</dc:date>
    <item>
      <title>df.ZoomToSelectedFeatures not working</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/df-zoomtoselectedfeatures-not-working/m-p/83131#M2851</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd like to take my selected set and zoom to it in the Arcpy.mapping module. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Online I found the df.ZoomToSelectedFeatures but I keep getting this error message: &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;lt;type 'exceptions.AttributeError'&amp;gt;: 'DataFrame' object has no attribute 'ZoomToSelectedFeatures'&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Failed to execute (testScript)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;what does that mean? my code looks like: &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;mxd = arcpy.mapping.MapDocument("CURRENT")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;lyr = arcpy.mapping.ListLayers(mxd, "Tantalis Files", df)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;lyr_qry = "CROWN_LANDS_FILE = '" + filenum + "'"&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;print lyr_qry&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddMessage(lyr_qry)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.SelectLayerByAttribute_management(lyr , "CLEAR_SELECTION")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddMessage("old selection cleared")&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.SelectLayerByAttribute_management(lyr , "NEW_SELECTION", lyr_qry)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df.ZoomToSelectedFeatures(lyr)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.RefreshActiveView()&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;gp.AddMessage("zoomed - happy?")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 21:20:34 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/df-zoomtoselectedfeatures-not-working/m-p/83131#M2851</guid>
      <dc:creator>JoshuaChan</dc:creator>
      <dc:date>2012-01-03T21:20:34Z</dc:date>
    </item>
    <item>
      <title>Re: df.ZoomToSelectedFeatures not working</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/df-zoomtoselectedfeatures-not-working/m-p/83132#M2852</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;df.zoomToSelectedFeatures()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 03 Jan 2012 21:34:32 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/df-zoomtoselectedfeatures-not-working/m-p/83132#M2852</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2012-01-03T21:34:32Z</dc:date>
    </item>
    <item>
      <title>Re: df.ZoomToSelectedFeatures not working</title>
      <link>https://community.esri.com/t5/geoprocessing-questions/df-zoomtoselectedfeatures-not-working/m-p/83133#M2853</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;thanks! I'm never sure what is supposed to go into the brackets.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;i've seen examples where stuff is in there and others where it's blank. How do we know when to do what?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Jan 2012 17:32:03 GMT</pubDate>
      <guid>https://community.esri.com/t5/geoprocessing-questions/df-zoomtoselectedfeatures-not-working/m-p/83133#M2853</guid>
      <dc:creator>JoshuaChan</dc:creator>
      <dc:date>2012-01-05T17:32:03Z</dc:date>
    </item>
  </channel>
</rss>

