Hallo,
I would like to save lyr-files from multiple Features in the table of contents.
This works:
It includes files in groups but unfortunately also the group names themselves.
Is it possible to avoid that lyrs are made from the groupname, but only from the content of the group?
Further, it is possible to exclude certain layers / layergroups?
Would be very kind if you could help me out with some code-snippets?
Yours,
Matthias
I would like to save lyr-files from multiple Features in the table of contents.
This works:
PHP Code:
import arcpy
mxd = arcpy.mapping.MapDocument("CURRENT")
for lyr in arcpy.mapping.ListLayers(mxd):
lyr.saveACopy(lyr.name + ".lyr")
Is it possible to avoid that lyrs are made from the groupname, but only from the content of the group?
Further, it is possible to exclude certain layers / layergroups?
Would be very kind if you could help me out with some code-snippets?
Yours,
Matthias