BUG
In a Python geoprocessing script, using the ListFields.Type method to return field type returns different values than are required in the AddField command. For example, when listing the fields of a feature class, fc using the following method:
Code:
f = gp.ListFields(fc)
ff = f.Next()
while ff:
field_type = ff.Type
field_len = ff.Length
ff = f.Next()
del f,ff
This is a known issue.
Code:
if (field_type == 'String'):
newField_type = 'TEXT'
elseif (field_type == 'Integer'):
newField_type = 'LONG'
end if
Article ID:000009403
Get help from ArcGIS experts
Download the Esri Support App