<?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: Apply .lyrx file symbology via Python in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284877#M12362</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/apply-symbology-from-layer.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/apply-symbology-from-layer.htm"&gt;Apply Symbology From Layer—Data Management toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;So you ruled out adding the data from a path&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;If the input is a feature class or dataset path, this tool will automatically create and return a new layer with the result of the tool applied.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; That leaves the symbology field... which you have tried without success... manually I presume it isn't needed and reads and applies the symbology correctly, and whether/how to update the symbology&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;"&gt;ApplySymbologyFromLayer_management (in_layer, in_symbology_layer, &lt;STRONG&gt;{symbology_fields}&lt;/STRONG&gt;, &lt;STRONG&gt;{update_symbology}&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Which leave my suggestion of filing a tech support case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF there is nothing that you do manually when not doing this via arcpy, you seem to have covered everything, but the 'issues' with applysymbologyfromlayer noted by others might just be wider than the sum of the parts OR the documentation needs to be updated with more than the simple use cases&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keep the thread posted if you find a workaround&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 26 Jun 2018 11:14:28 GMT</pubDate>
    <dc:creator>DanPatterson_Retired</dc:creator>
    <dc:date>2018-06-26T11:14:28Z</dc:date>
    <item>
      <title>Apply .lyrx file symbology via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284873#M12358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi all,&amp;nbsp;I am trying to add a TIF file as an ArcGIS Pro map layer and apply symbology from a .lyrx file. If I manually drag a TIF file onto the map&amp;nbsp;and import the .lyrx file, it draws just fine.&amp;nbsp;These data layers are dynamic, so I want to automate adding many of these TIF files and symbolizing them via python.&amp;nbsp;I found 2 different ways to use&amp;nbsp;python to add a TIF file as a new map layer, but I'm stuck on applying the .lyrx file.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;With either approach, I then use&amp;nbsp;arcpy.ApplySymbologyFromLayer_management to try to set the symbology. I&amp;nbsp;never get a python error, but it doesn't have any effect. The new layer is just there with the default stretched black-to-white color ramp.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;datapath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'C:\\temp'&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os
aprx &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcGISProject&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
m &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; aprx&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listMaps&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;‍‍‍‍‍

&lt;SPAN class="comment token"&gt;# approach 1 - creates a layer with a name I assign&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;MakeRasterLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;datapath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'wrfout_d3.2015081400.f13.0000.UV10.tif'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'f13'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'f13'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
asfl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ApplySymbologyFromLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'f13'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;datapath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'wind_barbs_uv.lyrx'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
asfl
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'f13'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;

&lt;SPAN class="comment token"&gt;# approach 2 - creates a layer with the same name as the TIF&lt;/SPAN&gt;
lyr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; m&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;addDataFromPath&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;datapath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'wrfout_d3.2015081400.f13.0000.UV10.tif'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
asfl2 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ApplySymbologyFromLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'wrfout_d3.2015081400.f13.0000.UV10.tif'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;datapath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'wind_barbs_uv.lyrx'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
asfl2
&lt;SPAN class="operator token"&gt;&amp;lt;&lt;/SPAN&gt;Result &lt;SPAN class="string token"&gt;'wrfout_d3.2015081400.f13.0000.UV10.tif'&lt;/SPAN&gt;&lt;SPAN class="operator token"&gt;&amp;gt;&lt;/SPAN&gt;
‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Possibly relevant details:&amp;nbsp;&lt;/P&gt;&lt;UL style="list-style-type: square;"&gt;&lt;LI&gt;I am using the "Vector Field" symbology type&lt;/LI&gt;&lt;LI&gt;The TIF has 2 bands for the U and the V direction components (these are set in .lyrx file)&lt;/LI&gt;&lt;LI&gt;I also tried plugging the default band names ("Band_1" &amp;amp; "Band_2") into the "&lt;SPAN style="color: #4c4c4c; background-color: #ffffff; font-weight: 300;"&gt;symbology_fields" parameter of the&amp;nbsp;&lt;SPAN style="color: #3d3d3d; font-weight: 400;"&gt;ApplySymbologyFromLayer_management&lt;SPAN&gt;&amp;nbsp;function. It also had no effect.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="background-color: #ffffff; color: #3d3d3d; font-weight: 400;"&gt;&lt;SPAN&gt;Updated from 2.1.2 to 2.1.3 with the same result.&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #3d3d3d; font-weight: 400;"&gt;&lt;SPAN&gt;I'm not sure if I'm doing the wrong thing or missing a step. In the help, it shows&amp;nbsp;&lt;SPAN style="background-color: #ffffff;"&gt;ApplySymbologyFromLayer_management being used to apply symbology to another layer file, so I'm guessing it's not meant to applied to a map layer, but I don't know where to go from there.&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="background-color: #ffffff; color: #3d3d3d; font-weight: 400;"&gt;&lt;SPAN&gt;Thanks!&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:46:39 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284873#M12358</guid>
      <dc:creator>DavidAskov1</dc:creator>
      <dc:date>2021-12-11T13:46:39Z</dc:date>
    </item>
    <item>
      <title>Re: Apply .lyrx file symbology via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284874#M12359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David... a shortish read, but something is afoot&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/message/778895-adding-feature-class-and-applying-symbology-in-arcgis-pro-using-arcpy"&gt;https://community.esri.com/message/778895-adding-feature-class-and-applying-symbology-in-arcgis-pro-using-arcpy&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;so I am not clear if there is a definitive problem and/or solution.... hate to give you the ...Tech Support ...answer, but the more on an issue, the quicker they are identified and/or addressed&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 19:12:30 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284874#M12359</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-25T19:12:30Z</dc:date>
    </item>
    <item>
      <title>Re: Apply .lyrx file symbology via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284875#M12360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;That was adding the layer, then getting the reference to it from the layer list, and then applying the symbology. I wasn't doing the middle step, instead using the&amp;nbsp;layer object. When I tried that approach, I got the same result. Thanks, though.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 22:09:43 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284875#M12360</guid>
      <dc:creator>DavidAskov1</dc:creator>
      <dc:date>2018-06-25T22:09:43Z</dc:date>
    </item>
    <item>
      <title>Re: Apply .lyrx file symbology via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284876#M12361</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The way I know how to this is to run the&amp;nbsp;Make Feature Layer tool in the python script tool, returning the layer as an output parameter -- and applying the lyrx using the output parameter's Symbology property.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 25 Jun 2018 22:18:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284876#M12361</guid>
      <dc:creator>curtvprice</dc:creator>
      <dc:date>2018-06-25T22:18:20Z</dc:date>
    </item>
    <item>
      <title>Re: Apply .lyrx file symbology via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284877#M12362</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;A class="link-titled" href="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/apply-symbology-from-layer.htm" title="http://pro.arcgis.com/en/pro-app/tool-reference/data-management/apply-symbology-from-layer.htm"&gt;Apply Symbology From Layer—Data Management toolbox | ArcGIS Desktop&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;So you ruled out adding the data from a path&amp;nbsp;&lt;/LI&gt;&lt;/OL&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Avenir Next W01','Avenir Next W00','Avenir Next','Avenir','Helvetica Neue',sans-serif; font-size: 15.8px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: normal; word-spacing: 0px;"&gt;If the input is a feature class or dataset path, this tool will automatically create and return a new layer with the result of the tool applied.&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; That leaves the symbology field... which you have tried without success... manually I presume it isn't needed and reads and applies the symbology correctly, and whether/how to update the symbology&lt;/P&gt;&lt;BLOCKQUOTE class="jive_macro_quote jive-quote jive_text_macro"&gt;&lt;P&gt;&lt;/P&gt;&lt;SPAN style="display: inline !important; float: none; background-color: transparent; color: #4c4c4c; font-family: 'Consolas','Andale Mono','Lucida Console','Monaco',monospace; font-size: 17px; font-style: normal; font-variant: normal; font-weight: 400; letter-spacing: normal; orphans: 2; text-align: left; text-decoration: none; text-indent: 0px; text-transform: none; -webkit-text-stroke-width: 0px; white-space: pre-wrap; word-spacing: 0px; word-wrap: break-word;"&gt;ApplySymbologyFromLayer_management (in_layer, in_symbology_layer, &lt;STRONG&gt;{symbology_fields}&lt;/STRONG&gt;, &lt;STRONG&gt;{update_symbology}&lt;/STRONG&gt;)&lt;/SPAN&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3.&amp;nbsp; Which leave my suggestion of filing a tech support case.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;IF there is nothing that you do manually when not doing this via arcpy, you seem to have covered everything, but the 'issues' with applysymbologyfromlayer noted by others might just be wider than the sum of the parts OR the documentation needs to be updated with more than the simple use cases&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Keep the thread posted if you find a workaround&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 26 Jun 2018 11:14:28 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284877#M12362</guid>
      <dc:creator>DanPatterson_Retired</dc:creator>
      <dc:date>2018-06-26T11:14:28Z</dc:date>
    </item>
    <item>
      <title>Re: Apply .lyrx file symbology via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284878#M12363</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David, please see my response on this related thread:&amp;nbsp;&lt;A href="https://community.esri.com/thread/216481"&gt;Adding feature class and applying symbology in ArcGIS Pro using arcpy&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It seems you are running into&amp;nbsp;&lt;STRONG style="color: #ff0000; background-color: #ffffff; border: 0px; font-weight: bold;"&gt;BUG-000108497:&lt;/STRONG&gt;&lt;SPAN style="color: #ff0000; background-color: #ffffff;"&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;Running Apply Layer Symbology as a script in the Python window does not update the symbology in the map.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 29 Jun 2018 18:05:59 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284878#M12363</guid>
      <dc:creator>EarlMedina</dc:creator>
      <dc:date>2018-06-29T18:05:59Z</dc:date>
    </item>
    <item>
      <title>Re: Apply .lyrx file symbology via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284879#M12364</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I updated the source using the same dataset for the&amp;nbsp;in and out and it worked! Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;datapath &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'C:\\temp\\2018-06\\WRF_wind_barbs_screenshots'&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; os
aprx &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;mp&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ArcGISProject&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"CURRENT"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
m &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; aprx&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listMaps&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'*'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
lyr &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; m&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;addDataFromPath&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;datapath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'wrfout_d3.2015081400.f13.0000.UV10.tif'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
lyr0 &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; m&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;listLayers&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
&lt;SPAN class="keyword token"&gt;print&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr0&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
asfl &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ApplySymbologyFromLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;lyr0&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;path&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;join&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;datapath&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'wind_barbs_uv.lyrx'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
in_dict &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'dataset'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'wrfout_d3.2015081400.f13.0000.UV10.tif'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'database'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; datapath&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
out_dict &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;{&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;'dataset'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'wrfout_d3.2015081400.f13.0000.UV10.tif'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'database'&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;:&lt;/SPAN&gt; datapath&lt;SPAN class="punctuation token"&gt;}&lt;/SPAN&gt;
lyr0&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;updateConnectionProperties&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;in_dict&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; out_dict&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:46:42 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284879#M12364</guid>
      <dc:creator>DavidAskov1</dc:creator>
      <dc:date>2021-12-11T13:46:42Z</dc:date>
    </item>
    <item>
      <title>Re: Apply .lyrx file symbology via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284880#M12365</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I just got an email from the bug saying that the way to fix this is to set the output as derived. Not had chance to test it thought I'd post in case someone wanted to&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Public Explanation: To fix this issue:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;After adding the arcpy.ApplySymbologyFromLayer_management(layer, lyrfile) Python command, add the arcpy.SetParameterAsText(2, layer) parameter.&lt;/LI&gt;&lt;LI&gt;Save the script.&lt;/LI&gt;&lt;LI&gt;ArcGIS Pro &amp;gt; Catalog Pane &amp;gt; Toolbox &amp;gt; Right click Script &amp;gt; Properties.&lt;/LI&gt;&lt;LI&gt;Properties Window &amp;gt; Parameter Tab &amp;gt; Add a new parameter of type Layer, and set it to derived output Documenation: &lt;A href="https://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/setting-script-tool-parameters.htm#GUID-59C4A61C-AC33-4BA3-8453-AC8328E34453"&gt;https://pro.arcgis.com/en/pro-app/arcpy/geoprocessing_and_python/setting-script-tool-parameters.htm#GUID-59C4A61C-AC33-4BA3-8453-AC8328E34453&lt;/A&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Aug 2019 23:18:48 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284880#M12365</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2019-08-26T23:18:48Z</dc:date>
    </item>
    <item>
      <title>Re: Apply .lyrx file symbology via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284881#M12366</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I can confirm this works:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/458024_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;CODE&gt;&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; sys&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; os&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; arcpy
&lt;SPAN class="keyword token"&gt;import&lt;/SPAN&gt; arcpy

inputLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;'lakes'&lt;/SPAN&gt;
symbologyLayer &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; r&lt;SPAN class="string token"&gt;"C:\Temp\symbologyBug\Polygon_Styles.lyrx"&lt;/SPAN&gt;
&lt;SPAN class="comment token"&gt;# Symbolize the input by FIL_COLOURfield&lt;/SPAN&gt;
symbologyFields &lt;SPAN class="operator token"&gt;=&lt;/SPAN&gt; &lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;[&lt;/SPAN&gt;&lt;SPAN class="string token"&gt;"VALUE_FIELD"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"FIL_COLOUR"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; &lt;SPAN class="string token"&gt;"FIL_COLOUR"&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;]&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;ApplySymbologyFromLayer_management&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;inputLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; symbologyLayer&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; symbologyFields&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
arcpy&lt;SPAN class="punctuation token"&gt;.&lt;/SPAN&gt;SetParameterAsText&lt;SPAN class="punctuation token"&gt;(&lt;/SPAN&gt;&lt;SPAN class="number token"&gt;0&lt;/SPAN&gt;&lt;SPAN class="punctuation token"&gt;,&lt;/SPAN&gt; inputLayer&lt;SPAN class="punctuation token"&gt;)&lt;/SPAN&gt;
&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 13:46:44 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/284881#M12366</guid>
      <dc:creator>DavidWilton</dc:creator>
      <dc:date>2021-12-11T13:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Apply .lyrx file symbology via Python</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/1007065#M34768</link>
      <description>&lt;P&gt;This was very helpful!&lt;/P&gt;</description>
      <pubDate>Fri, 04 Dec 2020 20:29:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/apply-lyrx-file-symbology-via-python/m-p/1007065#M34768</guid>
      <dc:creator>2Quiker</dc:creator>
      <dc:date>2020-12-04T20:29:11Z</dc:date>
    </item>
  </channel>
</rss>

