Python to set Layer properties/symbology/display back ground value RGB 0 0 0

4896
2
08-16-2014 05:46 AM
PhoukhongPhongsa
New Contributor

Hi friends,

Please help me how to set  Layer properties/Symbology/Display back ground value RGB to value 0 0 0 for all 200 raster files in once with python command?

I tried to use arcpy.SetRasterProperties_management but this is not the correct one.

Thank you in advance!

0 Kudos
2 Replies
DanPatterson_Retired
MVP Emeritus

There is no one command, it may be able to be scripted...did you find a tool that will perform it once?

0 Kudos
PhoukhongPhongsa
New Contributor

So much time spent and found it here. However, space, indent ...etc. enter.... is challenges!

import os, arcpy, arcpy.mapping

from arcpy import env

mxd = arcpy.mapping.MapDocument("Current")

lstas = arcpy.mapping.ListLayers(mxd,"*.img")

    for las in lstas:

    arcpy.ApplySymbologyFromLayer_management (las, r"C_RE.lyr\20101105t045002_01_or_mo.img")

0 Kudos