<?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 arcpy.management.ApplySymbologyFromLayer only works for python in window, not work in python toolbox? in ArcGIS Pro Questions</title>
    <link>https://community.esri.com/t5/arcgis-pro-questions/arcpy-management-applysymbologyfromlayer-only/m-p/636372#M28402</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using ArcGIS Pro 2.4.0. Is there somebody, this bug has been fix it? I am still has this issue, arcpy.management.ApplySymbologyFromLayer only work python window, not python toolbox. So I have to use SDK C# to process if I want to use&amp;nbsp;&lt;SPAN&gt;arcpy.management.ApplySymbologyFromLayer?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/198403"&gt;Pro 2.0 Bug "Apply Symbology From Layer" GeoProcessing Tool&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;The issue has been fixed with the SDK only. The developers are aware that it is not working in Python and are looking into it. In my case, I had a simple point symbol to assign and the following steps managed to assign the symbology to my new layer:&lt;/P&gt;&lt;OL style="background-color: #ffffff; border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;Add the lyrx file to the map: m.addDataFromPath(mysymbologylayerxpath)&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;Get the layer's symbology: mysymbology=m.listLayers()[0].symbology&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;Remove the layer from the map: m.removeLayer(m.listLayers()[0])&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;Assign the symbology to my new layer in the map: new_layer.symbology=&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;mysymbology&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;They are ways to update some of the symbology properties as well if needed. I did not need to in my case. I hope this helps until the issue gets resolved.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Christine Dartiguenave&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Esri Water Resources Team&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 08 Aug 2019 23:02:35 GMT</pubDate>
    <dc:creator>JeanCheng</dc:creator>
    <dc:date>2019-08-08T23:02:35Z</dc:date>
    <item>
      <title>arcpy.management.ApplySymbologyFromLayer only works for python in window, not work in python toolbox?</title>
      <link>https://community.esri.com/t5/arcgis-pro-questions/arcpy-management-applysymbologyfromlayer-only/m-p/636372#M28402</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using ArcGIS Pro 2.4.0. Is there somebody, this bug has been fix it? I am still has this issue, arcpy.management.ApplySymbologyFromLayer only work python window, not python toolbox. So I have to use SDK C# to process if I want to use&amp;nbsp;&lt;SPAN&gt;arcpy.management.ApplySymbologyFromLayer?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.esri.com/thread/198403"&gt;Pro 2.0 Bug "Apply Symbology From Layer" GeoProcessing Tool&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;The issue has been fixed with the SDK only. The developers are aware that it is not working in Python and are looking into it. In my case, I had a simple point symbol to assign and the following steps managed to assign the symbology to my new layer:&lt;/P&gt;&lt;OL style="background-color: #ffffff; border: 0px; padding: 0px 0px 0px 30px;"&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;Add the lyrx file to the map: m.addDataFromPath(mysymbologylayerxpath)&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;Get the layer's symbology: mysymbology=m.listLayers()[0].symbology&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;Remove the layer from the map: m.removeLayer(m.listLayers()[0])&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; margin: 0.5ex 0px;"&gt;Assign the symbology to my new layer in the map: new_layer.symbology=&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;mysymbology&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;They are ways to update some of the symbology properties as well if needed. I did not need to in my case. I hope this helps until the issue gets resolved.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Christine Dartiguenave&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit;"&gt;Esri Water Resources Team&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 08 Aug 2019 23:02:35 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-pro-questions/arcpy-management-applysymbologyfromlayer-only/m-p/636372#M28402</guid>
      <dc:creator>JeanCheng</dc:creator>
      <dc:date>2019-08-08T23:02:35Z</dc:date>
    </item>
  </channel>
</rss>

