AnsweredAssumed Answered

ApplySymbologyFromLayer_management not working on script tool. Works on Python console.

Question asked by msilveira.ucu on Nov 6, 2014
Latest reply on Nov 7, 2014 by Hornbydd

Hey guys,

I can't update layer symbology from my script tool. It's working on the Python console, and it's driving me nuts.

I've reduced my code to this most basic example that now follows.

On Python console:

arcpy.ApplySymbologyFromLayer_management("climate_pp_geq1020", "//VBOXSVR/data/10min/binarySymbology.lyr")



On script tool:


import arcpy

 arcpy.ApplySymbologyFromLayer_management("climate_pp_geq1020", "//VBOXSVR/data/10min/binarySymbology.lyr")


The EXACT SAME THING ("import arcpy" is the only addition) DOES NOT WORK for me when ran from a script tool instead of the console.

I don't receive any error messages either.

The layer I'm trying to alter is a raster one in case it helps.


I'm using ArcGIS 10.1

I've also tried arcpy.mapping.UpdateLayer instead and it also does nothing with no error messages.


I'd greatly appreciate it if anyone could give me a solution to this.