[Editor’s note: I keep returning to this technique for calculating a feature’s extent (minimum bounding rectangle) in ArcGIS using the Field Calculator. Thanks William and Jeff!]
Republished in part from ESRI Forums.
Sample Field Calculator code for computing XMIN appears below.
Information about shape properties appears in the “Geometry Object
Model” diagram (pdf). All four parameters are Xmin, Xmax, Ymin, and Ymax.
dim Output as double
dim pGeom as IGeometryset pGeom = [shape]
Output = pGeom.Envelope.XMin
Tags: arcmap, bounding box, esri, field calculator, gis, igeometry, xmax, xmin, ymax, ymin
dim pPointColl as IPointCollection
set pPointColl = [Shape]
a = pPointColl.PointCount