Select to view content in your preferred language

Calculate Geometry does not work in my Arc10 tables

1074
4
12-29-2011 06:37 AM
NicolaiBencke1
Deactivated User
I can't get 'Calculate Geometry' to work in any of my tables since going to Arc10.  This applies to shapefiles, personal gdbs and file gdbs, in edit sessions and outside edit sessions.  I need this function constantly in my work, and filling in records one by one doesn't work for 50,000 records.  I've got Service Pack 3 loaded and an ArcInfo license.  I know my syntax is correct, I've been using this function for many years.  Did something change that I'm missing, or do I need to try to re-load Arc10 completely?
Tags (2)
0 Kudos
4 Replies
NicolaiBencke1
Deactivated User
I meant to say 'Field Calculator' not 'Calculate Geometry', forget this thread, I'll restart with new Title message.
0 Kudos
KL
by
Deactivated User
I need to find out if there is python script to do calculate geometry to X and Y coordinate, please help
0 Kudos
WilliamWillis
Occasional Contributor
I've had issues with Calculating Geometry in Arc10 as well.  One way that I got it to work correctly was changing the editing method to the old "Task and Target" method instead of using the new (unimpressive and issue riddled) templates method of editing.  To change it back to "Task and Target" go into the Advanced ArcMap Settings that is part of the installation folder.  However, if you're already back into the "Task and Target" then I don't have any suggestions.

Good luck!
0 Kudos
RichardFairhurst
MVP Honored Contributor
I can't get 'Calculate Geometry' to work in any of my tables since going to Arc10.  This applies to shapefiles, personal gdbs and file gdbs, in edit sessions and outside edit sessions.  I need this function constantly in my work, and filling in records one by one doesn't work for 50,000 records.  I've got Service Pack 3 loaded and an ArcInfo license.  I know my syntax is correct, I've been using this function for many years.  Did something change that I'm missing, or do I need to try to re-load Arc10 completely?


The Field Calculator did change at ArcGIS 10 to no longer support VBA.  Your calculation has to be rewritten in Python to work.  The basic syntax for calculating X/Y coordinates (for points and the beginning of a line) are:

!shape.firstpoint.X!
!shape.firstpoint.Y!

For the end of a line use:

!shape.lastpoint.X!
!shape.lastpoint.Y!

For the centroid of a polygon, polyline or multipoint use:

!shape.centroid.X!
!shape.centroid.Y!

See my response to this thread for other common field calculator python geometry expressions
.
0 Kudos