originLayerName = "123" #这里填入设置好的图层样式名称
mxd = arcpy.mapping.MapDocument(r"CURRENT")
originLayer = arcpy.mapping.ListLayers(mxd, originLayerName)[0]
layers = arcpy.mapping.ListLayers(mxd)
for lyr in layers:
if lyr.name == originLayer.name:
continue
if (originLayer.isFeatureLayer and lyr.isFeatureLayer) or (originLayer.isRasterLayer and lyr.isRasterLayer):
arcpy.ApplySymbologyFromLayer_management(in_layer=lyr, in_symbology_layer=originLayer)