1

Is there a way I can change the data type of a field (possibly using the python window). I have about 25 shapefiles which are all named differently, but the name of the fields I want to change from text to double are the same.

3
  • You can do it (manually) in ArcCatalog, I believe -- ref. Modifying field properties
    – Erica
    Commented Sep 29, 2014 at 14:59
  • I thought so too! i.imgur.com/14nKO9v.png
    – Alan Carr
    Commented Sep 29, 2014 at 15:03
  • "If the field contains data, you cannot change data types that would lead to loss of data. For example, you cannot change a long integer or float to a short integer, or change a blob to a text."
    – ianbroad
    Commented Sep 30, 2014 at 1:24

1 Answer 1

2

No. There is no way to change a field type. Single biggest complaint of all time on the ideas site, ignored by Esri for over a decade. If they ever did it they would only support it in a geodatabase, never a shapefile (a dead end format). Access could do it if this was a Personal geodatabase and probably SDE databases could do it directly.

You have to create a new double field and calculate the string values into it in each table. Python could do that process in a loop if the files are in the same directory.

1
  • I've just re-exported my raw data, changed field types in MapInfo then translated it back into a shapefile
    – Alan Carr
    Commented Sep 30, 2014 at 8:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.