Created
July 18, 2016 17:56
-
-
Save debboutr/19eebaee5c01155cc9d80835961eef58 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import os | |
mxd = arcpy.mapping.MapDocument("CURRENT") | |
df = arcpy.mapping.ListDataFrames(mxd)[0] | |
place = 'D:/Projects/chkNRSA_Watersheds/arcpyWSheds' | |
for f in os.listdir(place): | |
if '.shp' in f and not '.xml' in f: | |
if f[:9].replace('_','-') in wsheds: | |
addLayer = arcpy.mapping.Layer('%s/%s' % (place, f)) | |
arcpy.mapping.AddLayer(df,addLayer,"BOTTOM") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment