Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(4)  |  Call(4)  |  Derive(0)  |  Import(0)

src/a/r/arcpy-HEAD/townlayers.py   arcpy(Download)
# the map document, dataframe, town feature class and town group layer
mxd = arcpy.mapping.MapDocument(r'C:/dev/python/arcpy/mxd/towns.mxd')
df = arcpy.mapping.ListDataFrames(mxd, 'Towns')[0]
fc = 'C:/dev/python/arcpy/shapefile/towns.shp'
townGroup = arcpy.mapping.ListLayers(mxd, "Town Layers", df)[0]

src/a/r/arcapi-HEAD/arcapi.py   arcapi(Download)
        todel = [x]
    dtype = arcpy.Describe(x).dataType
    df = arcpy.mapping.ListDataFrames(mxd)[0]
 
    lr = "chart" + tstamp(tf = "%H%M%S")

src/a/r/arcpy-HEAD/layer-sources.py   arcpy(Download)
 
mxd = arcpy.mapping.MapDocument(sys.argv[1])
df = arcpy.mapping.ListDataFrames(mxd)[0]
 
filename = '%s_layer-sources.txt' % (os.path.basename(mxd.filePath)[:-4])

src/a/r/arcpy-HEAD/pages2pdf.py   arcpy(Download)
 
    # get DataFrame
    df = arcpy.mapping.ListDataFrames(mxd)[0]
 
    # set a minimun scale of 1:30000