HI THERE
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 symbol.py
# 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 = "\\\\ad.geo.unizh.ch\\home\\myhome\\Desktop\\Masterarbeit\\test\\RESULTATE"
Reach_Probability_____lyr = "\\\\ad.geo.unizh.ch\\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 = "\\\\ad.geo.unizh.ch\\home\\myhome\\Desktop\\Masterarbeit\\test\\RESULTATE\\Raster"
arcpy.ApplySymbologyFromLayer_management("", Reach_Probability_____lyr)
arcpy.env.extent = tempEnvironment0
thanks for any help or tips
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 symbol.py
# 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 = "\\\\ad.geo.unizh.ch\\home\\myhome\\Desktop\\Masterarbeit\\test\\RESULTATE"
Reach_Probability_____lyr = "\\\\ad.geo.unizh.ch\\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 = "\\\\ad.geo.unizh.ch\\home\\myhome\\Desktop\\Masterarbeit\\test\\RESULTATE\\Raster"
arcpy.ApplySymbologyFromLayer_management("", Reach_Probability_____lyr)
arcpy.env.extent = tempEnvironment0
thanks for any help or tips