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:
<SPAN class="kwd" style="color: #8a4a0b;">import</SPAN><SPAN class="pln" style="color: #000000;"> arcpy<BR />mxd </SPAN><SPAN class="pun" style="color: #145680;">=</SPAN><SPAN class="pln" style="color: #000000;"> arcpy</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">mapping</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">MapDocument</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="str" style="color: #800000;">"CURRENT"</SPAN><SPAN class="pun" style="color: #145680;">)</SPAN><SPAN class="pln" style="color: #000000;"><BR /></SPAN><SPAN class="kwd" style="color: #8a4a0b;">for</SPAN><SPAN class="pln" style="color: #000000;"> lyr </SPAN><SPAN class="kwd" style="color: #8a4a0b;">in</SPAN><SPAN class="pln" style="color: #000000;"> arcpy</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">mapping</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="typ" style="color: #2b91af;">ListLayers</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">mxd</SPAN><SPAN class="pun" style="color: #145680;">):</SPAN><SPAN class="pln" style="color: #000000;"><BR />lyr</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">saveACopy</SPAN><SPAN class="pun" style="color: #145680;">(</SPAN><SPAN class="pln" style="color: #000000;">lyr</SPAN><SPAN class="pun" style="color: #145680;">.</SPAN><SPAN class="pln" style="color: #000000;">name </SPAN><SPAN class="pun" style="color: #145680;">+</SPAN><SPAN class="pln" style="color: #000000;"> </SPAN><SPAN class="str" style="color: #800000;">".lyr"</SPAN><SPAN class="pun" style="color: #145680;">)</SPAN>
Thank you for your help.
Pierre