AnsweredAssumed Answered

automated symbology for many layers

Question asked by nepomuck0 on Dec 30, 2012
Latest reply on Jan 3, 2013 by nepomuck0

i have to szmbolyse a lot of rasterdatasets the same way. as I allready read, it should be possible to use arcpy.mapper i tried it to create a iteration< to get all rasters with the name #Reach_probability# out of my workspace. afterwards it would be realz nice< if those rasters (and not justone, all thogether > multiple) could figure as input rasters of the tool #apply symbology from layer#...   but this is not working..

here my code *exported from modelbuilder#

# ---------------------------------------------------------------------------
# iteration durch raster_und
# Created on: 2012-12-31 01:39:43.00000
#   (generated by ArcGIS/ModelBuilder)
# Description:
# ---------------------------------------------------------------------------

# Import arcpy module
import arcpy

# Load required toolboxes
arcpy.ImportToolbox("Model Functions")

# Local variables:
RESULTATE = "\\\\\\home\\myhome\\Desktop\\Masterarbeit\\test\\RESULTATE"
Reach_Probability_____lyr = "\\\\\\home\\myhome\\Desktop\\Masterarbeit\\test\\RESULTATE\\lyr_files\\Reach Probability [%].lyr"

# Process: Iterate Rasters
arcpy.IterateRasters_mb(RESULTATE, "Reach_probability*", "ASC", "RECURSIVE")

# Process: Apply Symbology From Layer
tempEnvironment0 = arcpy.env.extent
arcpy.env.extent = "\\\\\\home\\myhome\\Desktop\\Masterarbeit\\test\\RESULTATE\\Raster"
arcpy.ApplySymbologyFromLayer_management("", Reach_Probability_____lyr)
arcpy.env.extent = tempEnvironment0

thanks for any help or tips