python - How to use the List field function for a toolbox script? -
Get link
Facebook
X
Pinterest
Email
Other Apps
I am trying to write a simple script for a toolbox, such as Addfield_datamanagement toolbox script With a specialty table, a feature field adds a new field or sizefile to a table so far so good. # Import system modules import arppy #Workspace arcpy.env.workspace = "C: \\ user \\ xxx.gdb" # Feature class inputFFC = arcpy.GetParameterAsText Set (0) # Get list of field names in input string = ARPP.GetParameterSTtext (1) InputString = ARPP. ValidationFilename (inputstring, archp.एन.एन.व्ही. वर्कस्पेस) fieldlist = inputstring.spitit (";") fieldtype = archp.gateParamrayArrayText (2)
for field then it seems to work is; List in the field: arcpy.AddField_management (inputFC, fieldName, fieldType) arcpy.AddMessage ("Field Generated:" + fieldName) arcpy.AddMessage ("Script executed") field name is already built and prints the existing name! Not sure about the syntax of lin (Archaic ListField, Fill?) == 1: #: ListFields and not sure how to integrate it is not sure whether the input FC is correct? Arcpy.AddMessage ("Field already exists" field name)
This is in the above code! So, any help is welcome and appreciated!