I am creating a code that adds fields to a large set of shapefiles. I want to be able to open these shapefiles and edit the fields and then have them removed from the map document. I would like this because the amount of shapefiles that appear on the map document while the code is running is too large and ArcMap crashes.
Here is my code below:
for fc in arcpy.ListFeatureClasses():
arcpy.AddField_management(fc, "C_TYPE", "TEXT") #add new field to each shapefile
arcpy.AddField_management(fc, "C_UNIT", "TEXT") #add new field to each shapefile
arcpy.AddField_management(fc, "INTERVAL", "LONG") #add new field to each shapefile
Below is what I want to remove:
Too many contours get accumulated in the document.
Is there any way I can add a piece of code that can remove this?