Skip to main content
added 252 characters in body
Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

I think you need to do something more like this:

for field in fields:
    # add fields with the same properties
    arcpy.AddField_management(feature_class2,field.name)

but with more field properties being used as parameters.

The error message tells you that using the field object rather than accessing its properties is not an option.

If you were able to use a field object as a parameter with Add Field then that would appear in the Data Type column of the Syntax section of its Help (which it does not).

I think you need to do something more like this:

for field in fields:
    # add fields with the same properties
    arcpy.AddField_management(feature_class2,field.name)

but with more field properties being used as parameters.

The error message tells you that using the field object rather than accessing its properties is not an option.

I think you need to do something more like this:

for field in fields:
    # add fields with the same properties
    arcpy.AddField_management(feature_class2,field.name)

but with more field properties being used as parameters.

The error message tells you that using the field object rather than accessing its properties is not an option.

If you were able to use a field object as a parameter with Add Field then that would appear in the Data Type column of the Syntax section of its Help (which it does not).

Source Link
PolyGeo
  • 65.4k
  • 29
  • 114
  • 345

I think you need to do something more like this:

for field in fields:
    # add fields with the same properties
    arcpy.AddField_management(feature_class2,field.name)

but with more field properties being used as parameters.

The error message tells you that using the field object rather than accessing its properties is not an option.