<?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: How to group values after Unique symbology classification in arcpy? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216651#M16667</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this way but it didn't work. It doesn't group the values. But one thing I noticed that if I import the symbology layer from the symbology tab it works (it groups the values). So, I am not sure why it doesn't group the values from Arcpy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 03 Oct 2016 16:03:10 GMT</pubDate>
    <dc:creator>ManjariGoyal</dc:creator>
    <dc:date>2016-10-03T16:03:10Z</dc:date>
    <item>
      <title>How to group values after Unique symbology classification in arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216649#M16665</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to group values through arcpy. So, I would like to group &lt;STRONG&gt;all approved&lt;/STRONG&gt; together and&amp;nbsp;&lt;STRONG&gt;all reject&lt;/STRONG&gt; together. But I am not sure how to do it through Python script. Below is the part of the script:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;arcpy.MakeFeatureLayer_management(FC3, r"C:\Users\Documents\NGN\Regions\MW_Decision.lyr")&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;layer3 = arcpy.mapping.Layer(r"C:\Users\Documents\NGN\Regions\MW_Decision.lyr")&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;Sym_layer3 = r"C:\Users\Documents\NGN\Symbology layer new\MW_Decision.lyr"&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;arcpy.ApplySymbologyFromLayer_management (layer3, Sym_layer3)&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;arcpy.mapping.AddLayer(df, layer3, "AUTO_ARRANGE")&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;lyr3 = arcpy.mapping.ListLayers(mxd, "", df)[0]&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;lyr3.visible = False&lt;/STRONG&gt;&lt;BR /&gt;&lt;STRONG&gt;lyr3.name = "MW_Decision"&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;&lt;IMG __jive_id="237129" class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/237129_pastedImage_1.png" /&gt;&lt;/EM&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Sep 2016 19:44:58 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216649#M16665</guid>
      <dc:creator>ManjariGoyal</dc:creator>
      <dc:date>2016-09-30T19:44:58Z</dc:date>
    </item>
    <item>
      <title>Re: How to group values after Unique symbology classification in arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216650#M16666</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Manjari,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In the Layer properties under the Symbology tab, select all the approved symbols using the Shift key, right click on the selected symbol rows&amp;nbsp;and select Group Values.&amp;nbsp;This will condense all selected symbols into one symbol set which you can modify. You will need to do the same for the rejected symbols as well. Save this symbol configuration with your Sym_layer3 and it will get applied to the MW_Decision.lyr when you run your script. I hope this helps.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Andy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 15:37:25 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216650#M16666</guid>
      <dc:creator>AndyOmmen</dc:creator>
      <dc:date>2016-10-03T15:37:25Z</dc:date>
    </item>
    <item>
      <title>Re: How to group values after Unique symbology classification in arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216651#M16667</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Andy,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried this way but it didn't work. It doesn't group the values. But one thing I noticed that if I import the symbology layer from the symbology tab it works (it groups the values). So, I am not sure why it doesn't group the values from Arcpy.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 03 Oct 2016 16:03:10 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216651#M16667</guid>
      <dc:creator>ManjariGoyal</dc:creator>
      <dc:date>2016-10-03T16:03:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to group values after Unique symbology classification in arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216652#M16668</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am not seeing a refresh here&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/refreshtoc.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/refreshtoc.htm"&gt;RefreshTOC—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/refreshactiveview.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-functions/refreshactiveview.htm"&gt;RefreshActiveView—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/uniquevaluessymbology-class.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/uniquevaluessymbology-class.htm"&gt;UniqueValuesSymbology—Help | ArcGIS for Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 03:22:23 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216652#M16668</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-05T03:22:23Z</dc:date>
    </item>
    <item>
      <title>Re: How to group values after Unique symbology classification in arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216653#M16669</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dan, I have tried it but it doesn't work with Reresh TOC. Below is the complete script.&lt;/P&gt;&lt;P&gt;import arcpy&lt;BR /&gt;from arcpy import env&lt;BR /&gt;import arcpy.mapping&lt;/P&gt;&lt;P&gt;# Set environment settings&lt;BR /&gt;env.workspace = "C:\Users\Documents\NGN\Regions"&lt;BR /&gt;arcpy.env.overwriteOutput = True&lt;/P&gt;&lt;P&gt;#define projection&lt;BR /&gt;Prjfile = r"C:\Users\Documents\NGN\Regions\WGS1984.prj"&lt;BR /&gt;spRef = arcpy.SpatialReference(Prjfile)&lt;/P&gt;&lt;P&gt;#Local Variables&lt;BR /&gt;FC3 = r"C:\Users\Documents\NGN\Regions\South_DO.gdb\MW_Decision"&lt;BR /&gt;FC4 = r"C:\Users\Documents\NGN\Regions\South_DO.gdb\RF_Decision"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;mxd = arcpy.mapping.MapDocument(r"C:\Users\Documents\NGN\DO Maps\Demo_South.mxd")&lt;BR /&gt;df = arcpy.mapping.ListDataFrames(mxd,"Layers")[0]&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.MakeFeatureLayer_management(FC4, r"C:\Users\Documents\NGN\Regions\RF_Decision.lyr")&lt;BR /&gt;layer4 = arcpy.mapping.Layer(r"C:\Users\Documents\NGN\Regions\RF_Decision.lyr")&lt;BR /&gt;Sym_layer4 = r"C:\Users\Documents\NGN\Symbology layer new\RF_Decision.lyr"&lt;BR /&gt;arcpy.ApplySymbologyFromLayer_management (layer4, Sym_layer4)&lt;BR /&gt;arcpy.mapping.AddLayer(df, layer4, "TOP")&lt;BR /&gt;lyr4 = arcpy.mapping.ListLayers(mxd, "", df)[0]&lt;BR /&gt;lyr4.visible = False&lt;BR /&gt;lyr4.name = "RF_Decision"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;arcpy.MakeFeatureLayer_management(FC3, r"C:\Users\Documents\NGN\Regions\MW_Decision.lyr")&lt;BR /&gt;layer3 = arcpy.mapping.Layer(r"C:\Users\Documents\NGN\Regions\MW_Decision.lyr")&lt;BR /&gt;Sym_layer3 = r"C:\Users\Documents\NGN\Symbology layer new\MW_Decision.lyr"&lt;BR /&gt;arcpy.ApplySymbologyFromLayer_management (layer3, Sym_layer3)&lt;BR /&gt;arcpy.mapping.AddLayer(df, layer3, "TOP")&lt;BR /&gt;lyr3 = arcpy.mapping.ListLayers(mxd, "", df)[0]&lt;BR /&gt;lyr3.visible = False&lt;BR /&gt;lyr3.name = "MW_Decision"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;mxd.saveACopy(r"C:\Users\Documents\NGN\DO Maps\South.mxd")&lt;/P&gt;&lt;P&gt;arcpy.RefreshActiveView()&lt;BR /&gt;arcpy.RefreshTOC()&lt;BR /&gt;del mxd,df&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;print "save South mxd"&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 15:07:41 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216653#M16669</guid>
      <dc:creator>ManjariGoyal</dc:creator>
      <dc:date>2016-10-05T15:07:41Z</dc:date>
    </item>
    <item>
      <title>Re: How to group values after Unique symbology classification in arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216654#M16670</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;not clear as to why the refresh is being done after the save?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 17:15:36 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216654#M16670</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2016-10-05T17:15:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to group values after Unique symbology classification in arcpy?</title>
      <link>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216655#M16671</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have tried before save and after save it doesn't work. I don't think it has anything to do with refresh as my other layer RF Decision shows correct symbology.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 05 Oct 2016 18:02:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-to-group-values-after-unique-symbology/m-p/216655#M16671</guid>
      <dc:creator>ManjariGoyal</dc:creator>
      <dc:date>2016-10-05T18:02:16Z</dc:date>
    </item>
  </channel>
</rss>

