5

I have researched How to add attribute field to existing Shapefile via Python without ArcGIS? but could not implement it.

Can give me examples of how to add field name in attribute table?

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

1 Answer 1

7

All of the geoprocessing tools can be setup in ModelBuilder within ArcGIS. Once in ModelBuilder 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", "")

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