AnsweredAssumed Answered

Save Layer File with Python

Question asked by pierrek on Apr 1, 2015
Latest reply on Apr 7, 2015 by sephefox

Hi there,


I am working on a Multi-scale layer map using ArcMap.


Since I have several hundred of different map layer in my *.mxd I'd like to save for each individual map layer a Layer File.


I found a script which already works but I'd like to get it to save the Layer Files for each Group Layer in a separate folder.

So all Layer Files should end up in a separate folder like the Group Layer is called in my *.mxd.


I am not a coder and was already happy with the script I found but it would be great if somebody can help me with extending this script.


This is the script I was using:


import arcpy
= arcpy.mapping.MapDocument("CURRENT")
for lyr in arcpy.mapping.ListLayers(mxd):
.saveACopy( + ".lyr")



Thank you for your help.