<?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 Dynamically changing layer's symbology on a GP service in ArcGIS Enterprise Questions</title>
    <link>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/505639#M19614</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on a model with model builder.&lt;/P&gt;&lt;P&gt;At the end of the process i want to set the symbology using "Apply symbology from layer" tool.&lt;/P&gt;&lt;P&gt;The .lyr file varies by the input of the process. I'm doing this using "calculate value" tool.&lt;/P&gt;&lt;P&gt;Here is the code in the calculate value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def x(num):&lt;/P&gt;&lt;P&gt; if num==2:&lt;/P&gt;&lt;P&gt;&amp;nbsp; return "C:\\tmp\GisSql.tmp2.lyr"&lt;/P&gt;&lt;P&gt; return "C:\\tmp\GisSql.tmp3.lyr"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now, the model runs perfectly on my local machine, including the symbology decision above.&lt;/P&gt;&lt;P&gt;but after publishing and trying to run it i get an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;esriJobMessageTypeError&lt;/EM&gt;: ERROR 000229: Cannot open c:\arcgisserver\directories\arcgisjobs\test\model_nafa_bar_chart_gpserver\jd3923b869c2f4389a24e3bceb8b36236\scratch\tmp\GisSql.tmp2.lyr&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, i understand the problem. The .lyr file was not copied to the server, or the server cant find it for any other reason.&lt;/P&gt;&lt;P&gt;The question is, how can i dynamically change the symbology of a geo process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried registering the "c:\tmp" folder with with the server - with no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice? I've spent hours on this..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 27 May 2015 20:03:50 GMT</pubDate>
    <dc:creator>shayamrany</dc:creator>
    <dc:date>2015-05-27T20:03:50Z</dc:date>
    <item>
      <title>Dynamically changing layer's symbology on a GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/505639#M19614</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm working on a model with model builder.&lt;/P&gt;&lt;P&gt;At the end of the process i want to set the symbology using "Apply symbology from layer" tool.&lt;/P&gt;&lt;P&gt;The .lyr file varies by the input of the process. I'm doing this using "calculate value" tool.&lt;/P&gt;&lt;P&gt;Here is the code in the calculate value:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;def x(num):&lt;/P&gt;&lt;P&gt; if num==2:&lt;/P&gt;&lt;P&gt;&amp;nbsp; return "C:\\tmp\GisSql.tmp2.lyr"&lt;/P&gt;&lt;P&gt; return "C:\\tmp\GisSql.tmp3.lyr"&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;now, the model runs perfectly on my local machine, including the symbology decision above.&lt;/P&gt;&lt;P&gt;but after publishing and trying to run it i get an error:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;&lt;EM&gt;esriJobMessageTypeError&lt;/EM&gt;: ERROR 000229: Cannot open c:\arcgisserver\directories\arcgisjobs\test\model_nafa_bar_chart_gpserver\jd3923b869c2f4389a24e3bceb8b36236\scratch\tmp\GisSql.tmp2.lyr&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Well, i understand the problem. The .lyr file was not copied to the server, or the server cant find it for any other reason.&lt;/P&gt;&lt;P&gt;The question is, how can i dynamically change the symbology of a geo process?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I tried registering the "c:\tmp" folder with with the server - with no luck.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any advice? I've spent hours on this..&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 27 May 2015 20:03:50 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/505639#M19614</guid>
      <dc:creator>shayamrany</dc:creator>
      <dc:date>2015-05-27T20:03:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically changing layer's symbology on a GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/505640#M19615</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have the same problem. I have written a python script which should apply a symbology from a lyr file to the output layer. The path to the file is hard coded in the script. The folder has read acces for the user of the ArcGIS for Server Windows service. The tool ApplySymbologyFromLayer_management does not fire an exception. But in the map service of the gp service, the applied symbology does not show up. The features are always symbolized with the symbology used when publishing the geoprocessing service.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE class="lia-code-sample line-numbers language-none"&gt;&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;features &lt;/SPAN&gt;= arcpy.GetParameterAsText(0)
&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;whereClause &lt;/SPAN&gt;= arcpy.GetParameterAsText(1)
arcpy.MakeFeatureLayer_management(features, "layerName", whereClause)
&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;symbology = 'C:\\data\\gp\\mysymbology.lyr'&lt;/SPAN&gt;
arcpy.ApplySymbologyFromLayer_management("&lt;SPAN style="color: rgba(0, 0, 0, 0); font-family: Consolas, 'Courier New', Courier, mono, serif; font-size: 12px;"&gt;layerName"&lt;/SPAN&gt;, symbology)
arcpy.SetParameterAsText(2, "layerName")&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 11 Dec 2021 22:11:11 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/505640#M19615</guid>
      <dc:creator>StefanOffermann</dc:creator>
      <dc:date>2021-12-11T22:11:11Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically changing layer's symbology on a GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/505641#M19616</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Any luck on this ?? I'm trying to do the same thing&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 02 Oct 2020 15:07:12 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/505641#M19616</guid>
      <dc:creator>Anonymous User</dc:creator>
      <dc:date>2020-10-02T15:07:12Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically changing layer's symbology on a GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/1031374#M29554</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Has there been any luck on this issue? Either with the two options below work in ArcGIS Pro 2.5, but does not contain symbology in the Geoprocessing Widget in WAB:&lt;/P&gt;&lt;LI-CODE lang="python"&gt;# Method 1 - ApplySymbologyFromLayer():
arcpy.ApplySymbologyFromLayer("layer_PATH", "symbology_PATH")

# Method 2 - parameters[1].symbology:
parameters[1].symbology = "symbology_PATH"&lt;/LI-CODE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have any help on preserving symbology from a layer file (".lyrx") in the output of a geoprocessing service? It simply is not preserved for me.&lt;/P&gt;</description>
      <pubDate>Sun, 28 Feb 2021 21:44:52 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/1031374#M29554</guid>
      <dc:creator>PhilipC</dc:creator>
      <dc:date>2021-02-28T21:44:52Z</dc:date>
    </item>
    <item>
      <title>Re: Dynamically changing layer's symbology on a GP service</title>
      <link>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/1346448#M37605</link>
      <description>&lt;P&gt;anybody have any luck with this? I realllllllllly need this figured out for a custom GP service I built too.&lt;/P&gt;</description>
      <pubDate>Mon, 06 Nov 2023 23:34:29 GMT</pubDate>
      <guid>https://community.esri.com/t5/arcgis-enterprise-questions/dynamically-changing-layer-s-symbology-on-a-gp/m-p/1346448#M37605</guid>
      <dc:creator>Juan_Toro-Killion</dc:creator>
      <dc:date>2023-11-06T23:34:29Z</dc:date>
    </item>
  </channel>
</rss>

