Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have research on the question (How to add an attribute field to an existing Shapefile via Python) but could not implement it.

If you can give me examples on how to add field name in attribute table.

I have to show a hyperlink in the attribute table , using an online query



share|improve this question

1 Answer 1

All of the geoprocessing tools can be setup in model builder within ArcGIS. Once in model builder you can export the code out as python. To run the code you can either right click it in Windows Explorer and run it with python.exe or copy the code line for line into IDLE (Python GUI), which is installed with ArcGIS.

# Import arcpy module
import arcpy

# Local variables:
point_shp = "C:\\temp\\point.shp"

# Process: Add Field
arcpy.AddField_management(point_shp, "NEWFIELD", "TEXT", "", "", "25", "", "NON_NULLABLE", "NON_REQUIRED", "")
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.