Tag Info

Hot answers tagged


Code looks OK to me so I guess its down to formatting of the string especially with "\" or "/" or "\\" . This line: lyr1 = arcpy.mapping.Layer("C:\ArcGis\Aerial_Imagery.lyr") should really be: lyr1 = arcpy.mapping.Layer(r"C:\ArcGis\Aerial_Imagery.lyr") or it could be: lyr1 = arcpy.mapping.Layer("C:\\ArcGis\\Aerial_Imagery.lyr") So the full path ...

Only top voted, non community-wiki answers of a minimum length are eligible