add geometry attributes hangs system

1538
3
11-30-2016 08:08 PM
BrianKaplan
Occasional Contributor

The Add Geometry Attributes tool in ArcGIS Pro 1.3 hangs the application after I put in a feature class that is in State Plane feet.   The map is in WGS84.  I then get the endless spinning wheel.  The feature class is in a geodatabase and only has 170 records.  The Add XY coordinate tool works though.  I do miss the Calculate Field geometry in ArcMap.

As others suggested !SHAPE.CENTROID.X! and !SHAPE.CENTROID.Y! in the field calculator work too provided you don't have any records that have null shape.  If you do you get an NoneType error and nothing happens.  In ArcMap 10.4.1 when this occurred you get  your results up to the point of the first null shape and then no X or Y results after plus you get the error message.  The latter helped me figure out why it was going wrong.

I've encountered the endless spinning wheel during other operations in ArcPro 1.3 on a Windows 7 computer..  It would be nice if you could somehow stop it and continue instead of having to shutdown the application.

0 Kudos
3 Replies
DanPatterson_Retired
MVP Emeritus

Sounds you have geometry issues, so prior to trying calculations that require valid geometry attributes, you should run Repair Geometry—Data Management toolbox | ArcGIS for Desktop in the interim.  Perhaps if you send your problem files to esri, they can use it for testing to see if they can implement a solution to abandon further efforts if bad geometry is found.

RebeccaStrauch__GISP
MVP Emeritus

Are you specifying the coordinate system (State Plane) of the data you are wanting the coordinates for?  Since the map is WMA and the data is in State Plane, I think you need to include this "optional" attribute.  From the help

Add Geometry Attributes—Data Management toolbox | ArcGIS for Desktop 

EDIT: even though the last part of the quote below says "The coordinate system of the input features is used by default.", I would still give it a try.

AddGeometryAttributes_management (Input_Features, Geometry_Properties, {Length_Unit}, {Area_Unit}, {Coordinate_System})

If a coordinate system is specified, the length and area calculations will be in the units of that coordinate system unless different units are selected in the Length Unit and Area Unit parameters.

Coordinate_System
(Optional)

The coordinate system in which the coordinates, length, and area will be calculated. The coordinate system of the input features is used by default.

Coordinate System
BrianKaplan
Occasional Contributor

Thank you all for your comments and suggestions.  I opened the feature class in a new project and it worked fine.  I even tried setting the map to WGS84 and the state plane feature class was populated with feet values without specifying the coordinate system optional parameter.   In summary, something about the project file was causing the problem.