Script tool raster layer display problem in 10.1 script tool

774
2
12-17-2012 01:29 PM
LisaNelson
New Contributor II
Hello,

I have a script tool (originally written in 10.0 SP5) that generates raster layers, then adds them using a derived
output script tool parameter.  The tool/script works great in 10.1, except the final step of adding the raster layers to the
map (using arcpy.SetParameterAsText()).  The layer is added correctly IF no symbology is used. However, if symbology is set
by populating the Parameter Properties Symbology value in the tool, ArcMap crashes when adding the raster layer.  I've tried with both
the default *.lyr file, which was created in 10.0 SP5 and a new *.lyr file created with 10.1.  Same result if symbology is applied
via the script tool (==ArcMap crash). 

Interestingly,  the raster dataset outputs can be added manually (after re-opening ArcMap)
and the Properties --> Symbology dialog used to successfully import either the 10.0 or 10.1 LYR file...

Not sure why the auto-symbology fails so spectacularly...  These are file geodatabase rasters, un-signed 8-bit, nothing special...

Any help appreciated!

Lisa
Tags (2)
0 Kudos
2 Replies
JakeSkinner
Esri Esteemed Contributor
Hi Lisa,

Would you be able to upload your code?  This will make it easier to troubleshoot.
0 Kudos
LisaNelson
New Contributor II
Hello,

Here's a zip archive with a map package (v10.0) and the toolbox.  If it is run in 10.1, the outputs will be created correctly but ArcMap will crash when adding the raster layer if symbology is used (Scripts\GenericLandcoverLACScript_ScriptTool.py, line 71).



Thanks for taking a look at this!

Lisa
0 Kudos