0

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?

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

1 Answer 1

1

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 and acknowledge you have read our privacy policy.

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