I am trying to add a field to all layers with multiple GDB's. Am I unable to collect a list of values and run addField tool on them?
Thanks
Code:
import arcpy
import os, math
from arcpy import env
in_workspace = r"F:/test/testRnd"
rndValue = "int(round(!ELEVATION!, -2))"
fcList = []
fieldName = "SL_ELEV"
for dirpath, dirnames, filenames in arcpy.da.Walk(in_workspace, datatype="FeatureClass",type="All"):
for filename in filenames:
fcList.append(os.path.join(dirpath, filename))
#Add new field
arcpy.AddField_management(fcList, fieldName, "SHORT", "", "", "", "", "NULLABLE")