spatial.to_featureclass fails to overwrite network dataset

11-22-2019 09:17 AM
Occasional Contributor

I am using the spatially enabled dataframe (SEDF) to process a featureclass that participates in a geometric network. The python code is run on data I export from SDE into a fGDB. After I concatenate the fields I want to write the SEDF back to the fGDB. But the error code is ERROR 001919: The feature class cannot be deleted because participates in a network dataset. 

Update: use arcpy.Delete_management(Path_To_Geometric_Network) before calling sedf.spatial.to_featureclass(Path_To_FC_in_FGDB, overwrite = True) For my processes deleting the GN will not negatively impact my requirements from the data. Be careful and choose wisely before you delete the GN

Tags (2)
0 Kudos
0 Replies