AnsweredAssumed Answered

can a geometry object be used with select layers by location?

Question asked by SeaforthGeo on Oct 2, 2020
Latest reply on Oct 6, 2020 by SeaforthGeo

I am trying to use Select Layers By Location tool in Python.


I have a polygon feature class that I would like to iterate though each feature and do a select layers by location in order to get a list of layers that each polygon intersects with.


Can I use a search cursor to iterate through the polygons and pass the geometry to Select Layers By Location as the select_features parameter?


extents = sys.argv[1]
#polygon shapefile containing 4 polygons
    arcpy.env.workspace = "C:\Dataset.gdb"
    #get extents spatial reference
    ex_sp = arcpy.Describe(extents).spatialReference

    fcs = arcpy.ListFeatureClasses()
    with da.SearchCursor(extents,["SHAPE@"]) as scursor:
        for row in scursor:
            boundary = row[0]
             Output_Layer_Names, Count =, overlap_type="INTERSECT",
                 select_features=boundary, search_distance="", selection_type="NEW_SELECTION",


Any help is appreciated