I am using ModelBuilder to create a tool. In the middle I have to convert the string values of two columns of a data (in attribute table) to double (for calculations in later steps).

Can I do this using ModelBuilder itself rather than doing it manually?

  • You can do the conversion directly within the calculation step, in VB it would be something like CDbl([myField]). – Hornbydd Jan 5 '16 at 16:28

In ModelBuilder, "add a new field" to store the double value for each column. Set the new field as double. Then add "field calculation" to the model where the new field = the old field.

In the end you will have the two old fields in string, and two new fields in double.

You could go a step further and add "delete columns" to the model to delete the string columns once the conversion has been made.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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