I was wondering if anyone out there would help me with a step in my HW assignment...
So far this is my python program - which does what it is supposed to.
# Import system modules
import sys, string, os, arcgisscripting
# Create the Geoprocessor object
gp = arcgisscripting.create()
# Load required toolboxes...
gp.AddToolbox("C:/ArcGIS/ArcToolbox/Toolboxes/Data Management Tools.tbx")
# Script argum ents...
Input_Table = sys.argv[1]
gp.addmessage("sys.argv[1] is " + Input_Table)
Field_Name = sys.argv[2]
gp.addmessage("sys.argv[2] is " + Field_Name)
# Local variables...
Output_Feature_Class = ""
# Process: Add Field...
gp.AddField_management(Input_Table, Field_Name, "TEXT", "", "", "", "", "NULLABLE", "NON_REQUIRED", "")
My task is to unpack my second parameter (sys.argv[2]) to break it into multiple items in a list and then enlose the add filed code in a loop to add the multiple field values.
Obviously, python is not my thing. I am sure this is an easy task.
Thanks so much!