I am trying to add created records in one layer to another feature layer using ArcPy script. Is there any sample script to do so? Thanks in advance.
Lots of "ifs" there.
I would start with consolidating your data so you don't have to cycle through a number of layers that you know won't meet the conditions in the first place.
You don't indicate :
In some cases directing to "memory" workspace helps Write geoprocessing output to memory
Also, is 5 minutes really too long? 😉 (ie. is this a 911 or similiar application?)
Hi @DanPatterson
I have come up with a solution to the task I wanted to accomplish, but the script is taking around 5 minutes to do perform the task(s). I need to minimise the time of processing, great to have your expert suggestion if I can reduce the processing time,
......................................................................
for m in aprx.listMaps(): for layer in aprx.activeMap.listLayers(): if(layer.name[0:12]=="CGD.PARCELS_" and layer.getSelectionSet()): arcpy.management.Append(layer, "BASEDATA", "NO_TEST") arcpy.SelectLayerByLocation_management("BASEDATA","ARE_IDENTICAL_TO",layer)
........................................................................
Related... with unresolved questions in the post
Copying exact record in another feature class while creating the record in a feature class using ArcPy....
Angemeldete Mitglieder können Beiträge verfassen, Updates folgen und mehr. Neu hier? Registriere ein kostenloses Konto.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.