import arcpy from arcpy import env env.workspace = r"C:\temp\python\test.gdb" fc = "Airports" for field in arcpy.ListFields(fc): print field.name, field.type, field.length
#Open output text file log = open('listfields.txt', 'w') for field in arcpy.ListFields(fc): print >> log, field.name, field.type, field.length log.close()
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.