<?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: arcpy unique values many fields symbology in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329825#M25656</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pass your fields in as a list in the renderer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Feb 2020 15:27:16 GMT</pubDate>
    <dc:creator>DavidPike</dc:creator>
    <dc:date>2020-02-19T15:27:16Z</dc:date>
    <item>
      <title>arcpy unique values many fields symbology</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329824#M25655</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi there,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I&amp;nbsp;am doing a very simple python script. That should run for ARCGIS 10.5.1.&lt;/P&gt;&lt;P&gt;The goal is to switch the symbols categories of several FCs (layers in TOC) from "Unique values" to "Unique values, many fields". where the first value is the existing "value field" and the second would be "NGI". I cannot find a way of having the second value for symbolizing my layers...&lt;/P&gt;&lt;P&gt;I just put the code part where i have the doubt, before bellow there is a connection to the mxd and then to the layers:&lt;/P&gt;&lt;P&gt;(...)&lt;/P&gt;&lt;P&gt;if lyr.isFeatureLayer==True:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lSymbol=lyr.symbology&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lExisting = lSymbol.valueField&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lExisting = str(lExisting)&amp;nbsp; &amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lSymbol.valueField=lExisting&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lSymbol.addAllValues() ## until this point it does only for one value field&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;## the problem is if i do the next part it overwrites the above...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lSymbol.valueField="NGI"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lSymbol.addAllValues()&lt;/P&gt;&lt;P&gt;(...)&lt;/P&gt;&lt;P&gt;mxd=Save()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have 27 mxds pointing to the same GDB&amp;nbsp;... in each there are more than 100 Layers. Each layer has a definition query that defines the location (states in US and Europe) that is stored in "NGI"... but if i want to edit anything the templates are not showing nothing, because the templates do not work with definition queries unless manually we had the "NGI" of the location of the mxd. The work around i though of is to the above... still not working.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers and thanks for the help&lt;/P&gt;&lt;P&gt;PS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 14:51:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329824#M25655</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2020-02-19T14:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy unique values many fields symbology</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329825#M25656</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Pass your fields in as a list in the renderer&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 15:27:16 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329825#M25656</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-02-19T15:27:16Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy unique values many fields symbology</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329826#M25657</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;something like this?:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;(...)&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;l_lists = ["NGI"]&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;if lyr.isFeatureLayer==True:&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lSymbol=lyr.symbology&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lExisting = lSymbol.valueField&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lExisting = str(lExisting)&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;l_lists.append(lExisting)&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lSymbol.valueField=l_lists&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;lSymbol.addAllValues() ## until this point it does only for one value field&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;(...)&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px; font-size: 14px;"&gt;mxd=Save()&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;didn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;ValueError: ['ITC','NGI']&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 16:01:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329826#M25657</guid>
      <dc:creator>PSGeo</dc:creator>
      <dc:date>2020-02-19T16:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy unique values many fields symbology</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329827#M25658</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It seems it's not possible&amp;nbsp; I was looking at the pro documentation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 17:24:46 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329827#M25658</guid>
      <dc:creator>DavidPike</dc:creator>
      <dc:date>2020-02-19T17:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: arcpy unique values many fields symbology</title>
      <link>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329828#M25659</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;If you are using ArcMap/ArcCatalog, and don't mind using undocumented ArcPy methods, you can use&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;SPAN style="margin: 0px; padding: 0px; border: 0px; font-weight: 400; font-style: normal; font-size: 15px; font-family: 'courier new', courier, monospace; vertical-align: baseline; outline: 0px !important; color: #3d3d3d; font-variant-ligatures: normal; font-variant-caps: normal; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial;"&gt;lyr._arc_object.getsymbology()&lt;/SPAN&gt;&lt;SPAN style="color: #3d3d3d; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 15px; font-style: normal; font-variant-ligatures: normal; font-variant-caps: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px; background-color: #ffffff; text-decoration-style: initial; text-decoration-color: initial; display: inline !important; float: none;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;to dump a JSON definition of the symbology and then use &lt;A class="link-titled" href="https://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/apply-symbology-from-layer.htm" title="https://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/apply-symbology-from-layer.htm"&gt;Apply Symbology From Layer—Help | Documentation&lt;/A&gt; to apply changes.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Feb 2020 20:10:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/arcpy-unique-values-many-fields-symbology/m-p/329828#M25659</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2020-02-19T20:10:48Z</dc:date>
    </item>
  </channel>
</rss>

