Why is my Arc Maps python script not working? All it does is use apply symbology

المشرف العام

Administrator
طاقم الإدارة
This is the first python script I have tried to write and I can't find out why it is not working. All I want to do is apply symbology from one layer to another.

The python shell is telling me: RuntimeError: Object: Error in executing tool

# Name: ApplySym.py# Purpose: apply the symbology from one layer to another# Import system modulesimport arcpyfrom arcpy import env# Set the current workspaceenv.workspace = "C:\Users\jrutledge\Desktop\Well DB Run 2_2015 (plus GAMA)\ArcMaps2015_2\MapOutput\ByWell\ShapeFiles"# Set layer to apply symbology toinputLayerFile = arcpy.mapping.Layer(r"C:\Users\jrutledge\Desktop\Well DB Run 2_2015 (plus GAMA)\ArcMaps2015_2\MapOutput\ByWell\ShapeFiles\T00010_SOURCE_TEMPERATURE_C_C_ Events.lyr")inputLayer = arcpy.mapping.ListLayers(inputLayerFile, "T00010_SOURCE_TEMPERATURE_C_C_ Events")# Set layer that output symbology will be based onsymbologyLayerFile = arcpy.mapping.Layer(r"C:\Users\jrutledge\Desktop\Well DB Run 2_2015 (plus GAMA)\ArcMaps2015_2\MapOutput\ByWell\ShapeFiles\T71850_NITRATE_LT_DIR.lyr")symbologyLayer = arcpy.mapping.ListLayers(symbologyLayerFile, "T71850_NITRATE_LT_DIR")# Apply the symbology from the symbology layer to the input layerarcpy.ApplySymbologyFromLayer_management (inputLayer, symbologyLayer)

أكثر...
 
أعلى