AnsweredAssumed Answered

Delete multiple fields

Question asked by dabera on Oct 22, 2012
Latest reply on Oct 22, 2012 by dabera
Hi Guys:

I am trying to use a pyhton script to delete multiple fields which are not in the list, but its not working. Any idea how to make is working. The code is as follows. Thanks.

import arcgisscripting, sys gp = arcgisscripting.create()    # set variables inputFc = sys.argv[1]  fdList = ['FID', 'Shape', 'MER', 'RGE', 'TWP', 'SEC', 'QS', 'Hectares']  fields = gp.ListFields(inputFc)   for field in fields:   if not in fdList:        gp.deletefield_management(inputFc)