<?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: is &amp;quot;zoom to selected feature&amp;quot; possible in arcpy.mapping? in Mapping Questions</title>
    <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24794#M277</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would change&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression ="MER= "+MER "AND" "TWP= "+TWP "AND" "RNG= "+RNG "AND" "SEC= "+SEC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression ="MER= "+ MER + " AND TWP= " + TWP + " AND RNG= " + RNG + " AND SEC= " + SEC&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression = "MER= {0} AND TWP= {1} AND RNG= {2} AND SEC= {3}".format(MER,TWP,RNG,SEC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 18 Jun 2012 14:41:07 GMT</pubDate>
    <dc:creator>JeffBarrette</dc:creator>
    <dc:date>2012-06-18T14:41:07Z</dc:date>
    <item>
      <title>is "zoom to selected feature" possible in arcpy.mapping?</title>
      <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24786#M269</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I'd like to have the user input a value as an argument that would then be used to do a "select by attribute" against a point dataset. Is it possible to "zoom to selected feature" using arcpy.mapping or some other python module?&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 09 Dec 2011 16:04:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24786#M269</guid>
      <dc:creator>JoshuaChan</dc:creator>
      <dc:date>2011-12-09T16:04:45Z</dc:date>
    </item>
    <item>
      <title>Re: is "zoom to selected feature" possible in arcpy.mapping?</title>
      <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24787#M270</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataFrame/00s300000003000000/"&gt;Yes&lt;/A&gt;&lt;SPAN&gt;, see the zoomToSelectedFeatures method. There are samples there to get you started.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 10 Dec 2011 20:20:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24787#M270</guid>
      <dc:creator>JasonScheirer</dc:creator>
      <dc:date>2011-12-10T20:20:39Z</dc:date>
    </item>
    <item>
      <title>Re: is "zoom to selected feature" possible in arcpy.mapping?</title>
      <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24788#M271</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;You can use the zoomToSelectedFeatures on the DataFrame class:&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataFrame/00s300000003000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataFrame/00s300000003000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or you can use the getSelectedExtent method on the Layer class (and apply that extent to the data frame object).&lt;/SPAN&gt;&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2011 13:12:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24788#M271</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2011-12-12T13:12:04Z</dc:date>
    </item>
    <item>
      <title>Re: is "zoom to selected feature" possible in arcpy.mapping?</title>
      <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24789#M272</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks. It seemed to work the first time but it zoomed me into the wrong location. Since then I've been trying to trouble shoot but in doing so, my script seems to have gotten broken and I can't get it to work anymore. Now I'm having trouble even with simple things like getting a count of my selected set just to see if I can see how many features are being selected before it zooms in. the GetCount_management returns an error of&amp;nbsp; 'Result' object has no attribute 'getOuput'.&amp;nbsp; Yet if I copy &amp;amp; paste those exact same lines into a PythonWin interactive window the script returns the correct number of selected features instead of an error message. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Must be Monday. I can't see what's going on here.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can use the zoomToSelectedFeatures on the DataFrame class:&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataFrame/00s300000003000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataFrame/00s300000003000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;or you can use the getSelectedExtent method on the Layer class (and apply that extent to the data frame object).&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Jeff&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 12 Dec 2011 20:12:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24789#M272</guid>
      <dc:creator>JoshuaChan</dc:creator>
      <dc:date>2011-12-12T20:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: is "zoom to selected feature" possible in arcpy.mapping?</title>
      <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24790#M273</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;still couldn't get the zoomToSelectedFeature thing to work. But my coworker did this successfully with dataframe.PanToExtent(lyr.getSelectedExtent) &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;You can use the zoomToSelectedFeatures on the DataFrame class:&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataFrame/00s300000003000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/DataFrame/00s300000003000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;or you can use the getSelectedExtent method on the Layer class (and apply that extent to the data frame object).&lt;BR /&gt;&lt;A href="http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/"&gt;http://help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#/Layer/00s300000008000000/&lt;/A&gt;&lt;BR /&gt;&lt;BR /&gt;Jeff&lt;/BLOCKQUOTE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 19 Dec 2011 17:48:54 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24790#M273</guid>
      <dc:creator>JoshuaChan</dc:creator>
      <dc:date>2011-12-19T17:48:54Z</dc:date>
    </item>
    <item>
      <title>Re: is "zoom to selected feature" possible in arcpy.mapping?</title>
      <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24791#M274</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi Guys,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was trying to use python for select by attribute using variables from user input. It works fine just for a single variable, but when it comes to more than one variable using the "AND" its giving me error. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;here part of the code : &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;MER&amp;nbsp; = sys.argv[1]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TWP&amp;nbsp; = sys.argv[2]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;RNG&amp;nbsp; = sys.argv[3]&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;SEC&amp;nbsp; = sys.argv[4]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression ="MER= "+MER "AND" "TWP= "+TWP "AND" "RNG= "+RNG "AND" "SEC= "+SEC&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;# Process: Select Layer By Attribute&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.SelectLayerByAttribute_management(lyr, "NEW_SELECTION", Expression)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any idea please ???&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Dan&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 20:31:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24791#M274</guid>
      <dc:creator>DanielAbera</dc:creator>
      <dc:date>2012-05-31T20:31:07Z</dc:date>
    </item>
    <item>
      <title>Re: is "zoom to selected feature" possible in arcpy.mapping?</title>
      <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24792#M275</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;still couldn't get the zoomToSelectedFeature thing to work. But my coworker did this successfully with dataframe.PanToExtent(lyr.getSelectedExtent)&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This should work :&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &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, "Layer Name", df)[0]&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;df.extent = lyr.getSelectedExtent(True)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;df.scale *= 1.5&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;arcpy.RefreshActiveView()&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 May 2012 20:41:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24792#M275</guid>
      <dc:creator>DanielAbera</dc:creator>
      <dc:date>2012-05-31T20:41:49Z</dc:date>
    </item>
    <item>
      <title>Re: is "zoom to selected feature" possible in arcpy.mapping?</title>
      <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24793#M276</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive-quote"&gt;I was trying to use python for select by attribute using variables from user input.&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This thread is about 'zoom to selected feature' issue. You have introduced a very different question in it. People who are not interested about 'zoom to selected' will not check this thread out and will not see your question. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;If you can, please start a new thread with your question. That will help other users with similar problem also.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 14 Jun 2012 21:54:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24793#M276</guid>
      <dc:creator>NobbirAhmed</dc:creator>
      <dc:date>2012-06-14T21:54:07Z</dc:date>
    </item>
    <item>
      <title>Re: is "zoom to selected feature" possible in arcpy.mapping?</title>
      <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24794#M277</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I would change&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression ="MER= "+MER "AND" "TWP= "+TWP "AND" "RNG= "+RNG "AND" "SEC= "+SEC&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;to&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression ="MER= "+ MER + " AND TWP= " + TWP + " AND RNG= " + RNG + " AND SEC= " + SEC&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;or &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Expression = "MER= {0} AND TWP= {1} AND RNG= {2} AND SEC= {3}".format(MER,TWP,RNG,SEC)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Jeff&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 18 Jun 2012 14:41:07 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24794#M277</guid>
      <dc:creator>JeffBarrette</dc:creator>
      <dc:date>2012-06-18T14:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: is "zoom to selected feature" possible in arcpy.mapping?</title>
      <link>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24795#M278</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Thanks All !!&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 03 Aug 2012 16:56:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/mapping-questions/is-quot-zoom-to-selected-feature-quot-possible-in/m-p/24795#M278</guid>
      <dc:creator>DanielAbera</dc:creator>
      <dc:date>2012-08-03T16:56:36Z</dc:date>
    </item>
  </channel>
</rss>

