Is this possible or do you have to delete one cursor before opening another?
RuntimeError: workspace already in transaction mode
with arcpy.da.InsertCursor('Points_Geom', ["PointID", 'SHAPE@XY']) as cursor: cursor.insertRow((123458, (4364181.91, 263840.13)))
cursor = arcpy.da.InsertCursor('Points_Geom', ["PointID", 'SHAPE@XY']) cursor.insertRow((123458, (4364181.91, 263840.13))) del cursor
import arcpy edit = arcpy.da.Editor(r'C:/Projects/GISPROD_ElectricDistribution_Extract.gdb') edit.startEditing(False,False) theIC = arcpy.da.InsertCursor(r'C:/Projects/GISPROD_ElectricDistribution_Extract.gdb/electric/servicepoint',['PHASEDESIGNATION', 'WORKORDERID', 'SUBTYPECD', 'PLACEMENTCONFIDENCE', 'SHAPE@']) theIC.insertRow(['7', '280773', '1', '90', arcpy.Point(292840.72313, 4818098.69548)]) edit.stopEditing(False)
Signed in members can post, follow updates, and more. New here? Register a free account.
Find useful guides, FAQs, and documents to help you navigate and make the most of Esri Community.