script not working as stand alone

المشرف العام

Administrator
طاقم الإدارة
The following script is working in the python Window in ArcMap but not in pyhtonWin:

import arcpy from arcpy import env env.workspace = r"J:\Non_RS_MXDs\LongHaul.gdb" mxd = arcpy.mapping.MapDocument(r"J:\Non_RS_MXDs\RSF_Long_Haul.mxd") df = arcpy.mapping.ListDataFrames(mxd, "Layers")[0] sourceLayer = r"J:\Non_RS_MXDs\Layer Files\Facility.lyr" for i in df: arcpy.ApplySymbologyFromLayer_management(i, sourceLayer) print "Done!"When I run it I get this error:

ERROR 000967: The input layer type must be a feature layer, raster layer, or tin layer. Failed to execute (ApplySymbologyFromLayer).Thanks



أكثر...
 
أعلى