Created
May 1, 2016 22:01
-
-
Save hwidlund/065dd4f0b8d4a9663c0199b6db4e9926 to your computer and use it in GitHub Desktop.
Snippet to use string format to examine ArcGIS feature class fields
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import arcpy | |
| source ="path/to/featureclass" | |
| srcFlds = arcpy.ListFields(source) | |
| for field in srcFlds: | |
| print("{0} type = {1} length = {2}".format(field.name, field.type, field.length)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment