I have a shape file that was exported from Autocad Map. It represents pipes in a network. I have a field representing the pipe dia, but it is a text field and would like to convert it to numeric. Can someone walk me thru those steps? Name of the text field is "LAYER" and I need the new numeric one to be "DIA" Thanks for any help you can give.
MKH
Solved! Go to Solution.
As mentioned by Sean, you need to add a field "DIA" with Type LONG INTEGER or FLOAT, depending on whether the desired value is an integer or Decimal Point value respectively.
Then Right-click "DIA" field > Field Calculator.
Expression:
[LAYER]
JayantaPoddar_0-1643214044756.png
The first thing you need to do is Add a Field and make sure you make it numeric. If you just need integers (whole numbers), choose Long as the data type. If you need a floating point decimal, choose Double as the data type:
AdrianWelsh_0-1643214155187.png
Now that you have this new field, DIA, right click on it and choose "Calculate Field":
AdrianWelsh_1-1643214236709.png
If you need to convert to an integer, in the field calculation box type this:
int(!LAYER!)If it's a floating point, type this:
float(!LAYER!)Make sure Python 3 is chosen as your Expression Type:
AdrianWelsh_2-1643214387304.png
Yes - my apologies for the rushed answer...
In ArcMap open your table. On the drop down choose Add Field.
Sean_Wray_1-1643220989344.png
Name it - define it as double
Sean_Wray_2-1643221204029.png
The right click the new field name in the table and choose Field Calculator
Sean_Wray_3-1643221327344.png
A box will popup. The field you are calculating will be populated. See in the screenshot where it says TEST=. Then in the fields box, double click the field name you want to copy the data from. In the example I choose X and click OK
Sean_Wray_4-1643221511801.png
You can use the add field tool and then use the field calculator to calculate what goes in it.
https://desktop.arcgis.com/en/arcmap/10.3/tools/data-management-toolbox/add-field.htm
yeah, I've seen the help, but it reads like a programming language, which confuses me entirely!
The first thing you need to do is Add a Field and make sure you make it numeric. If you just need integers (whole numbers), choose Long as the data type. If you need a floating point decimal, choose Double as the data type:
AdrianWelsh_0-1643214155187.png
Now that you have this new field, DIA, right click on it and choose "Calculate Field":
AdrianWelsh_1-1643214236709.png
If you need to convert to an integer, in the field calculation box type this:
int(!LAYER!)If it's a floating point, type this:
float(!LAYER!)Make sure Python 3 is chosen as your Expression Type:
AdrianWelsh_2-1643214387304.png
As mentioned by Sean, you need to add a field "DIA" with Type LONG INTEGER or FLOAT, depending on whether the desired value is an integer or Decimal Point value respectively.
Then Right-click "DIA" field > Field Calculator.
Expression:
[LAYER]
JayantaPoddar_0-1643214044756.png
Thanks very much. I appreciate the replies!
Yes - my apologies for the rushed answer...
In ArcMap open your table. On the drop down choose Add Field.
Sean_Wray_1-1643220989344.png
Name it - define it as double
Sean_Wray_2-1643221204029.png
The right click the new field name in the table and choose Field Calculator
Sean_Wray_3-1643221327344.png
A box will popup. The field you are calculating will be populated. See in the screenshot where it says TEST=. Then in the fields box, double click the field name you want to copy the data from. In the example I choose X and click OK
Sean_Wray_4-1643221511801.png