Advertisement
Guest User

Untitled

a guest
May 24th, 2015
223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.58 KB | None | 0 0
  1. import arcpy
  2. fc = "C:/Work/VitalSigns/ARCN-CAKN Dall Sheep/Data/LegacySurveyUnits/ARCN_Subunits_Sheep_WGS84.shp"
  3. fieldsList = arcpy.ListFields(fc) #get the fields
  4. fields = [] # create an empty list
  5. # loop through the fields and add the columns to the list, change the Shape column (containing geometry) into a token,
  6. for field in fieldsList:
  7. if field.name == "Shape":
  8. fields.append("Shape@")
  9. else:
  10. fields.append(field.name)
  11.  
  12. # loop through the fields and output them
  13. i = 0
  14. for field in fieldsList:
  15. print field.name + " = row[" + str(i) + "]"
  16. i = i + 1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement