I'm writing a script that has 30+ layers and a boundary layer. I need to copy all the layers that intersect with the boundary to a GDB.
I have the following for the "Select layer by location" tool
# Select by location all layers that intersect with AirBound and copy selection to GBD
m = aprx.listMaps("Test")[0]
for layer in m.listLayers():
if layer.name != AirBound:
arcpy.SelectLayerByLocation_management (layer, "INTERSECT", AirBound)
print (arcpy.GetMessages())
Is there any way to use "Copy Features" tool where the output name is the same as the input name?
Thanks!