Thank you I appreciate your help.
I tried this from the ArcMap Python window:
import os
basepath = r'N:\Temp\layerstyle'
mxd = arcpy.mapping.MapDocument("CURRENT")
for lyr in arcpy.mapping.ListLayers(mxd):
if lyr.isGroupLayer == True:
grpPath = os.path.join(basepath, str(lyr))
if not os.path.exists(grpPath):
os.makedirs(grpPath)
else:
fn = os.path.join(basepath, str(lyr) + ".lyr")
lyr.saveACopy(fn)
print "Saved: " + fn
Unfortunately it came back with an error message saying:
Parsing error SyntaxError : invalid syntax (line 6) |
I am not a Python coder so any help would be great.
Thank you.