ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Geometry Namespace / IGeometryEngine Interface / Move Method / Move(Geometry,Double,Double) Method
The geometry to move.
Units along the X-axis to move the geometry.
Units along the Y-axis to move the geometry.
Example Version

Move(Geometry,Double,Double) Method
Moves a geometry.
Syntax

Parameters

geometry
The geometry to move.
dx
Units along the X-axis to move the geometry.
dy
Units along the Y-axis to move the geometry.

Return Value

The moved geometry. If the input geometry is empty, then it is returned unchange.
Exceptions
ExceptionDescription
Geometry is null.
The method is not implemented for GeometryBag.
Remarks
Moves the Geometry along the X-axis and the Y-axis. Only changes the position of the Geometry without altering any of the other characteristics. Move is a spatial offset.

GeometryEngine Move

Example
Move a MapPoint
MapPoint pt = MapPointBuilderEx.CreateMapPoint(1.0, 3.0);
MapPoint ptResult = GeometryEngine.Instance.Move(pt, -3.5, 2.5) as MapPoint;
// ptResult is (-2.5, 5.5)
Move a Polyline
List<MapPoint> pts = new List<MapPoint>();
pts.Add(MapPointBuilderEx.CreateMapPoint(1.0, 1.0, 3.0));
pts.Add(MapPointBuilderEx.CreateMapPoint(3.0, 3.0, 3.0));
pts.Add(MapPointBuilderEx.CreateMapPoint(3, 2, 3.0));
pts.Add(MapPointBuilderEx.CreateMapPoint(4.0, 2.0, 3.0));

Polyline polyline = PolylineBuilderEx.CreatePolyline(pts);

Geometry geometry = GeometryEngine.Instance.Move(polyline, 3, 2);
Polyline polylineResult = geometry as Polyline;
// polylineResult.Points[0] = 4.0, 3.0, 3.0
// polylineResult.Points[1] = 6.0, 5.0, 3.0
// polylineResult.Points[2] = 6.0, 4.0, 3.0
// polylineResult.Points[3] = 7.0, 4.0, 3.0
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3 or higher.
See Also