auto calculate acreage
I was wondering if it is possible to either change the units of the Shape_Area field in a feature class to acres so that it is always automatically updated with the correct acreage or somehow create an acreage field and have it auto recalculate itself based on the Shape_Area field.
Mapping Center Answer:
There is no way to do this out of the box. I did find the following on the ArcGIS Desktop Discussion Forum - it is a custom button to calculate acreage (note that I have not tried this out myself): http://forums.esri.com/Thread.asp?c=93&f=992&t=271615
You can search for other related resources on the ESRI Support Site.
If you only need to do this once, add a new field in the attribute table and calculate the new acreage value. Here is the VBA code to use (check the "Advanced" option in the Field Calculator dialog - the first four lines go in the Pre-Logic VBA Script Code area and the last line goes in the bottom one - I assume here that you will call the new field "Acres"):
Dim dblArea as double
Dim pArea as IArea
Set pArea = [shape]
dblArea = pArea.area
If you anticipate having to repeat this process a number of times, you could also create a very simple model that will do this. It would contain the tools for adding a field and then calculating the field value. If you already have the acreage field in the attribute table adn you jsut want to update it, then you can add a first step that deletes the existing field before it adds the new field and calculates the values.
Alternatively, you could write a Python script to do the same, but in the script it could check for the existence of the existing field before deleting it.
Here's a tip: you can use the model template we recently posted on Mapping Center to start making your model -- this will save you even more time!
For more help with models and scripts, visit the Geoprocessing Resource Center.
If you would like to post a comment, please login.