I am working on applying symbology to multiple layers from lyr files for multiple MXDs within the IDE. I have been able to access the MXDs and iterate through and change the definition of "mxd". I am receiving the following error, however, when the ApplySymbologyFromLayer_management
process is run:
ERROR 000732: Input Layer: Dataset FCname does not exist or is not supported
My script is as follows:
# the MXDs to change, accessed and processed individually as 'i' is script not shown
mxd = arcpy.mapping.MapDocument(r'C:\Path\to\mxd\doc.mxd')
for lyr in arcpy.mapping.ListLayers(mxd):
if lyr.name == 'FCname':
arcpy.ApplySymbologyFromLayer_management(
in_layer="FCname",
in_symbology_layer="C:\Path\to\lyrs\FCname.lyr")
I have repeated the same ApplySymbologyFromLayer_management
tool within ArcMap successfully. Any ideas on why this process is not succeeding within my script?