<?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: Problem with 'Dissolve' and Field statistic in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99548#M7706</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gabriel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the MAX in your Dissolve tool should be in quotes.&lt;/P&gt;&lt;P&gt;What error message did you get?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 15 Jan 2015 21:26:41 GMT</pubDate>
    <dc:creator>RussellHooper</dc:creator>
    <dc:date>2015-01-15T21:26:41Z</dc:date>
    <item>
      <title>Problem with 'Dissolve' and Field statistic</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99547#M7705</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All - I am trying to use dissolve_management applying it to obtain a field statistic {MAX} from the field [TIME]. The format of the field 'Time' is numeric (float).&amp;nbsp; I am doing this for a set of FCs running through a For-loop. When I remove the field statistic option/constraint from the code it runs perfectly, but I need that Time statistic, as well as other statistics from other fields, but I figured if I get it for one I could get them for the others later.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code gets stuck on the first FC of the loop.&amp;nbsp; Thanks much for any insight on this !!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Import system modules&lt;/P&gt;&lt;P&gt;import arcpy, os&lt;/P&gt;&lt;P&gt;from arcpy import env&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Set environment settings&lt;/P&gt;&lt;P&gt;env.workspace = r"C:\GIS\Track1\1_Orig\T_shp\shp"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;# Set local variables&lt;/P&gt;&lt;P&gt;folder = r"C:\GIS\Track1\1_Orig\T_dis"&lt;/P&gt;&lt;P&gt;dissolveFields = ""&lt;/P&gt;&lt;P&gt;wildcard = ""&lt;/P&gt;&lt;P&gt;fctype = ""&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;try:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; infcs = arcpy.ListFeatureClasses(wildcard, fctype)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print infcs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; for fc in infcs:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; outfcs = folder + os.sep + fc&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; print outfcs&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; #outfcs = os.path.join(folder, fc)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.Dissolve_management (fc, outfcs, dissolveFields, ["TIME",{MAX}],&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; "SINGLE_PART","DISSOLVE_LINES")&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;except:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; print arcpy.GetMessages(2)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 20:57:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99547#M7705</guid>
      <dc:creator>GabrielBacca-Cortes</dc:creator>
      <dc:date>2015-01-15T20:57:26Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with 'Dissolve' and Field statistic</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99548#M7706</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Gabriel,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the MAX in your Dissolve tool should be in quotes.&lt;/P&gt;&lt;P&gt;What error message did you get?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Russell&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 21:26:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99548#M7706</guid>
      <dc:creator>RussellHooper</dc:creator>
      <dc:date>2015-01-15T21:26:41Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with 'Dissolve' and Field statistic</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99549#M7707</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Russell -&amp;nbsp; thanks for your response. I tried both 'MAX' and "MAX" and didn't work, when I removed { }, I get an error saying that the Statistical method is empty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I don't get any errors, I am just not getting any results. The 'print outfcs' helps me visualize by only printing the first output FC that the loop is stalled. When I remove the field statistics option, I get the entire list of output FCs, showing that the loop went through successfully. Otherwise no error, only at the bottom bar of the PythonWin a message saying that the Script 'returned exit code 0'.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas? thanks&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 21:44:00 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99549#M7707</guid>
      <dc:creator>GabrielBacca-Cortes</dc:creator>
      <dc:date>2015-01-15T21:44:00Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with 'Dissolve' and Field statistic</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99550#M7708</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, try this:&lt;/P&gt;&lt;PRE __default_attr="python" __jive_macro_name="code" class="jive_macro_code _jivemacro_uid_14213595215536451 jive_text_macro" jivemacro_uid="_14213595215536451" modifiedtitle="true"&gt;&lt;P style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;arcpy.Dissolve_management(fc, outfcs, dissolveFields, [["TIME","MAX"]], "SINGLE_PART","DISSOLVE_LINES")&lt;/P&gt;&lt;/PRE&gt;&lt;P style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;The curly brackets in the documentation mean that the parameter is optional.&lt;/P&gt;&lt;P style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;SPAN style="color: #4d4d4d; font-family: Arial, Helvetica, sans-serif; font-size: 11px; background-color: #ffffe1;"&gt;[[field, {statistic_type}],...] &lt;/SPAN&gt;means that you can supply a list lists and of strings (although that's not obvious). The first item of the list is the field name as string, the second item is and optional string specifying the statistic.&lt;/P&gt;&lt;P style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;&lt;/P&gt;&lt;P style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Hope this will work.&lt;/P&gt;&lt;P style="font-size: 14.3999996185303px; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif;"&gt;Filip.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Jan 2015 22:09:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99550#M7708</guid>
      <dc:creator>FilipKrál</dc:creator>
      <dc:date>2015-01-15T22:09:47Z</dc:date>
    </item>
    <item>
      <title>Re: Problem with 'Dissolve' and Field statistic</title>
      <link>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99551#M7709</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks Filip !&lt;/P&gt;&lt;P&gt;It worked. &lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Gabriel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 16 Jan 2015 14:37:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/problem-with-dissolve-and-field-statistic/m-p/99551#M7709</guid>
      <dc:creator>GabrielBacca-Cortes</dc:creator>
      <dc:date>2015-01-16T14:37:55Z</dc:date>
    </item>
  </channel>
</rss>

