<?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 Error from Apply Symbology from Layer in Script Tool in ModelBuilder Questions</title>
    <link>https://community.esri.com/t5/modelbuilder-questions/error-from-apply-symbology-from-layer-in-script/m-p/723514#M753</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a script tool loaded into a custom toolbox in ArcMap.&amp;nbsp; The script runs a bunch of sub-tools and creates a results layer.&amp;nbsp; I have created a .lyr file with desired symbology for the output results, and am using simple code in the script tool to load the resultant layer (location is user parameter).&amp;nbsp; See first code snippet below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I used the 'default' settings in my tool where it writes to a specific database, everything works fine, but if I change to a different database, when I try to apply symbology to output layer, I get following error message.&amp;nbsp; It is suggeesting that layers do not match, but both are just simple polygons.&amp;nbsp; Again, it works without issue, if I write to the 'default' database, only when I change the location of database does it give error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The really odd thing is it appears that it does apply the symbology, but has a broken source link.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/497586_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas of what may be going on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Neal&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---------------------BEGIN CODE SNIPPET TO LOAD LAYER AND APPLY SYMBOLOGY----------&lt;/P&gt;&lt;P&gt;outcurRskScrBldgsLyr = arcpy.MakeFeatureLayer_management(outcurRskScrBldgs,"zcurRiskScrBldgs")&lt;/P&gt;&lt;P&gt;curMXD=arcpymap.MapDocument("CURRENT")&lt;BR /&gt;df=arcpymap.ListDataFrames(curMXD)[0]&lt;BR /&gt;lyr=arcpymap.Layer("zcurRiskScrBldgs")&lt;BR /&gt;lyrfile=arcpymap.Layer(wksp+r"\_RARRSupportFiles\ArcGISLayerFiles\RARR_curRiskScrBldgs.lyr")&lt;BR /&gt;arcpymap.AddLayer(df,lyrfile,"TOP")&lt;BR /&gt;arcpy.ApplySymbologyFromLayer_management(lyr, lyrfile)&lt;/P&gt;&lt;P&gt;---------------------END CODE SNIPPER----------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------- BEGIN ERROR MESSAGE ---------------&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "C:\temp\RARR_OY1\_RARRSupportFiles\PythonScripts\RARR_CalcRskScr_Batch.py", line 171, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ApplySymbologyFromLayer_management(lyr, lyrfile)&lt;BR /&gt;&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\management.py", line 6951, in ApplySymbologyFromLayer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;BR /&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000968: The symbol layer does not match the input layer&lt;BR /&gt;Failed to execute (ApplySymbologyFromLayer).&lt;/P&gt;&lt;P&gt;-------------------------------- END ERROR MESSAGE --------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 23 Jun 2020 12:09:22 GMT</pubDate>
    <dc:creator>NealBanerjee</dc:creator>
    <dc:date>2020-06-23T12:09:22Z</dc:date>
    <item>
      <title>Error from Apply Symbology from Layer in Script Tool</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/error-from-apply-symbology-from-layer-in-script/m-p/723514#M753</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a script tool loaded into a custom toolbox in ArcMap.&amp;nbsp; The script runs a bunch of sub-tools and creates a results layer.&amp;nbsp; I have created a .lyr file with desired symbology for the output results, and am using simple code in the script tool to load the resultant layer (location is user parameter).&amp;nbsp; See first code snippet below&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If I used the 'default' settings in my tool where it writes to a specific database, everything works fine, but if I change to a different database, when I try to apply symbology to output layer, I get following error message.&amp;nbsp; It is suggeesting that layers do not match, but both are just simple polygons.&amp;nbsp; Again, it works without issue, if I write to the 'default' database, only when I change the location of database does it give error.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The really odd thing is it appears that it does apply the symbology, but has a broken source link.&lt;/P&gt;&lt;P&gt;&lt;IMG class="image-1 jive-image" src="https://community.esri.com/legacyfs/online/497586_pastedImage_1.png" /&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas of what may be going on?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;Neal&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;---------------------BEGIN CODE SNIPPET TO LOAD LAYER AND APPLY SYMBOLOGY----------&lt;/P&gt;&lt;P&gt;outcurRskScrBldgsLyr = arcpy.MakeFeatureLayer_management(outcurRskScrBldgs,"zcurRiskScrBldgs")&lt;/P&gt;&lt;P&gt;curMXD=arcpymap.MapDocument("CURRENT")&lt;BR /&gt;df=arcpymap.ListDataFrames(curMXD)[0]&lt;BR /&gt;lyr=arcpymap.Layer("zcurRiskScrBldgs")&lt;BR /&gt;lyrfile=arcpymap.Layer(wksp+r"\_RARRSupportFiles\ArcGISLayerFiles\RARR_curRiskScrBldgs.lyr")&lt;BR /&gt;arcpymap.AddLayer(df,lyrfile,"TOP")&lt;BR /&gt;arcpy.ApplySymbologyFromLayer_management(lyr, lyrfile)&lt;/P&gt;&lt;P&gt;---------------------END CODE SNIPPER----------&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;----------- BEGIN ERROR MESSAGE ---------------&lt;/P&gt;&lt;P&gt;Traceback (most recent call last):&lt;BR /&gt;&amp;nbsp; File "C:\temp\RARR_OY1\_RARRSupportFiles\PythonScripts\RARR_CalcRskScr_Batch.py", line 171, in &amp;lt;module&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; arcpy.ApplySymbologyFromLayer_management(lyr, lyrfile)&lt;BR /&gt;&amp;nbsp; File "c:\program files (x86)\arcgis\desktop10.6\arcpy\arcpy\management.py", line 6951, in ApplySymbologyFromLayer&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; raise e&lt;BR /&gt;ExecuteError: Failed to execute. Parameters are not valid.&lt;BR /&gt;ERROR 000968: The symbol layer does not match the input layer&lt;BR /&gt;Failed to execute (ApplySymbologyFromLayer).&lt;/P&gt;&lt;P&gt;-------------------------------- END ERROR MESSAGE --------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jun 2020 12:09:22 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/error-from-apply-symbology-from-layer-in-script/m-p/723514#M753</guid>
      <dc:creator>NealBanerjee</dc:creator>
      <dc:date>2020-06-23T12:09:22Z</dc:date>
    </item>
    <item>
      <title>Re: Error from Apply Symbology from Layer in Script Tool</title>
      <link>https://community.esri.com/t5/modelbuilder-questions/error-from-apply-symbology-from-layer-in-script/m-p/1510217#M4004</link>
      <description>&lt;P&gt;er get an answer to this issue or did you ever determine how to solve this problem?&amp;nbsp; I'm having the sam issue - using v3.2.2.&lt;/P&gt;</description>
      <pubDate>Thu, 25 Jul 2024 19:00:20 GMT</pubDate>
      <guid>https://community.esri.com/t5/modelbuilder-questions/error-from-apply-symbology-from-layer-in-script/m-p/1510217#M4004</guid>
      <dc:creator>TimThomas1</dc:creator>
      <dc:date>2024-07-25T19:00:20Z</dc:date>
    </item>
  </channel>
</rss>

