<?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: Loop through attributes in a layer and zoom to selected feature in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433911#M34106</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not that would be really useful...I just normally select what I need via a query for instance, get into edit mode, use the show selected records only option within the table, edit a cell, click on the next one, edit it etc etd.&amp;nbsp; I don't have much use for auto-auto-automation.&amp;nbsp; For example your workflows suggests you query for records then want to click a button, to go to the next selected record, then click in that cell, edit it click on the button again etc etc.&amp;nbsp; that you would be adding a step to my suggested one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better if you have a query that you can use to do the selection for the "bad" ones (or "good") or via manual selection... why not do it...launch the field calculator and type in the 1 or zero..then switch the selection and use the field calculator to do the opposite case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ignore this totally if you needs are significantly different&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 20 Oct 2014 17:18:44 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2014-10-20T17:18:44Z</dc:date>
    <item>
      <title>Loop through attributes in a layer and zoom to selected feature</title>
      <link>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433907#M34102</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is there a working solution `somewhere in python?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 10:08:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433907#M34102</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2014-10-20T10:08:55Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through attributes in a layer and zoom to selected feature</title>
      <link>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433908#M34103</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;yes the&lt;A href="http://resources.arcgis.com/en/help/main/10.2/index.html#/DataFrame/00s300000003000000/"&gt; arcpy.mapping module&lt;/A&gt;, specifically in the dataframe section.&amp;nbsp; Have a good read through that whole helpfile section, it is quite good&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 10:13:04 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433908#M34103</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-10-20T10:13:04Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through attributes in a layer and zoom to selected feature</title>
      <link>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433909#M34104</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Dan,&lt;/P&gt;&lt;P&gt;it's really good, but what i need is a button to loop through attributes, manually edit something (like insert in attribute table a 1 for error and 0 for no error) and loop to the next?&lt;/P&gt;&lt;P&gt;Is this possible?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is what I have so far, but how to stop the loop after each for statement and restart in python the place I left the loop?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14138036217034523" jivemacro_uid="_14138036217034523" modifiedtitle="true"&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;import os&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;import arcpy&lt;/P&gt;
&lt;P&gt;mxd = arcpy.mapping.MapDocument("CURRENT")&lt;/P&gt;
&lt;P&gt;df = arcpy.mapping.ListDataFrames(mxd, "")[0]&lt;/P&gt;
&lt;P&gt;SelLayer = arcpy.mapping.ListLayers(mxd, "Aenderung_MToS_6417341", df)[0]&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;for row in arcpy.SearchCursor(SelLayer):&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; df.extent = row.SHAPE.extent #Set the dataframe extent to the extent of the feature&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; df.scale = df.scale * 1.07 #Optionally give the shape a bit of padding around the edges&lt;/P&gt;
&lt;P&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.RefreshActiveView()&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; #Put in your export here&lt;/P&gt;
&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 11:15:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433909#M34104</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2014-10-20T11:15:35Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through attributes in a layer and zoom to selected feature</title>
      <link>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433910#M34105</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Or is it possible to connect the restart of the loop to the save edits button in the editor menu?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 12:18:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433910#M34105</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2014-10-20T12:18:55Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through attributes in a layer and zoom to selected feature</title>
      <link>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433911#M34106</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Not that would be really useful...I just normally select what I need via a query for instance, get into edit mode, use the show selected records only option within the table, edit a cell, click on the next one, edit it etc etd.&amp;nbsp; I don't have much use for auto-auto-automation.&amp;nbsp; For example your workflows suggests you query for records then want to click a button, to go to the next selected record, then click in that cell, edit it click on the button again etc etc.&amp;nbsp; that you would be adding a step to my suggested one.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Better if you have a query that you can use to do the selection for the "bad" ones (or "good") or via manual selection... why not do it...launch the field calculator and type in the 1 or zero..then switch the selection and use the field calculator to do the opposite case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Ignore this totally if you needs are significantly different&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Oct 2014 17:18:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433911#M34106</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2014-10-20T17:18:44Z</dc:date>
    </item>
    <item>
      <title>Re: Loop through attributes in a layer and zoom to selected feature</title>
      <link>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433912#M34107</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Your right, get a bit lost in "auto-auto-automotation". I like this word&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Oct 2014 06:27:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/loop-through-attributes-in-a-layer-and-zoom-to/m-p/433912#M34107</guid>
      <dc:creator>JohannesBierer</dc:creator>
      <dc:date>2014-10-21T06:27:42Z</dc:date>
    </item>
  </channel>
</rss>

