<?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 How do I properly use UpdateLayer to change symbology for layer? in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678027#M52523</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to change the symbology of a layer in a map document using arcpy. I have a reference layer I am using. Please see the following code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
nuristanGeol = arcpy.mapping.Layer(r"C:\GeolAfghanProvince.gdb\Nuristan_geology")
afgGeol = arcpy.mapping.Layer(r"C:\afgeolmap.lyr")
arcpy.mapping.UpdateLayer(df, nuristanGeol, afgGeol)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This doesn't return anything or update the layers with new symbology. I also tried refreshing the view and TOC.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Sun, 12 Dec 2021 16:46:45 GMT</pubDate>
    <dc:creator>Kevin_C</dc:creator>
    <dc:date>2021-12-12T16:46:45Z</dc:date>
    <item>
      <title>How do I properly use UpdateLayer to change symbology for layer?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678027#M52523</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am trying to change the symbology of a layer in a map document using arcpy. I have a reference layer I am using. Please see the following code:&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;mxd = arcpy.mapping.MapDocument("CURRENT")
df = arcpy.mapping.ListDataFrames(mxd)[0]
nuristanGeol = arcpy.mapping.Layer(r"C:\GeolAfghanProvince.gdb\Nuristan_geology")
afgGeol = arcpy.mapping.Layer(r"C:\afgeolmap.lyr")
arcpy.mapping.UpdateLayer(df, nuristanGeol, afgGeol)&lt;/PRE&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;This doesn't return anything or update the layers with new symbology. I also tried refreshing the view and TOC.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What am I doing wrong here?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 12 Dec 2021 16:46:45 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678027#M52523</guid>
      <dc:creator>Kevin_C</dc:creator>
      <dc:date>2021-12-12T16:46:45Z</dc:date>
    </item>
    <item>
      <title>Re: How do I properly use UpdateLayer to change symbology for layer?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678028#M52524</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;This doesn't return anything&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Regarding the code not returning anything, you need to &lt;A class="link-titled" href="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/addlayer.htm" title="http://desktop.arcgis.com/en/arcmap/latest/analyze/arcpy-mapping/addlayer.htm"&gt;AddLayer—Help | ArcGIS Desktop&lt;/A&gt; after you create it.&amp;nbsp; That may address your second issue to, but I don't have time to test.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2019 23:03:49 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678028#M52524</guid>
      <dc:creator>JoshuaBixby</dc:creator>
      <dc:date>2019-02-08T23:03:49Z</dc:date>
    </item>
    <item>
      <title>Re: How do I properly use UpdateLayer to change symbology for layer?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678029#M52525</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is also: &lt;A href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/apply-symbology-from-layer.htm"&gt;Apply Symbology From Layer&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 08 Feb 2019 23:54:47 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678029#M52525</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2019-02-08T23:54:47Z</dc:date>
    </item>
    <item>
      <title>Re: How do I properly use UpdateLayer to change symbology for layer?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678030#M52526</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That isn't just for arcpy within ArcGIS Pro, assuming that's different somehow? I'm using ArcMap.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2019 01:20:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678030#M52526</guid>
      <dc:creator>Kevin_C</dc:creator>
      <dc:date>2019-02-09T01:20:22Z</dc:date>
    </item>
    <item>
      <title>Re: How do I properly use UpdateLayer to change symbology for layer?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678031#M52527</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For&amp;nbsp;Desktop 10.3-10.6&amp;nbsp;versions: &lt;A href="http://desktop.arcgis.com/en/arcmap/latest/tools/data-management-toolbox/apply-symbology-from-layer.htm"&gt;Apply Symbology From Layer&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2019 01:26:57 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678031#M52527</guid>
      <dc:creator>RandyBurton</dc:creator>
      <dc:date>2019-02-09T01:26:57Z</dc:date>
    </item>
    <item>
      <title>Re: How do I properly use UpdateLayer to change symbology for layer?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678032#M52528</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thanks, I'll try that out when I get back to work. Although I'm still trying to figure out how I screwed up UpdateLayer.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 09 Feb 2019 01:29:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678032#M52528</guid>
      <dc:creator>Kevin_C</dc:creator>
      <dc:date>2019-02-09T01:29:20Z</dc:date>
    </item>
    <item>
      <title>Re: How do I properly use UpdateLayer to change symbology for layer?</title>
      <link>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678033#M52529</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The issue was me trying to use arcpy.mapping.Layer() to define the nuristanGeol feature class which is the layer to be updated. I should've used arcpy.mapping.ListLayers(mxd) to point a variable at nuristanGeol. And then call this variable within UpdateLayer().&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 13 Feb 2019 22:12:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/how-do-i-properly-use-updatelayer-to-change/m-p/678033#M52529</guid>
      <dc:creator>Kevin_C</dc:creator>
      <dc:date>2019-02-13T22:12:17Z</dc:date>
    </item>
  </channel>
</rss>

