ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Move Method / Move(Layer,IEnumerable<Int64>,Double,Double) Method
The layer of the features to move.
The collection of oids
Units along the x-axis to move the geometry.
Units along the y-axis to move the geometry.
Example

In This Topic
    Move(Layer,IEnumerable<Int64>,Double,Double) Method
    In This Topic
    Moves a collection of features along the same vector.
    Syntax
    Public Overloads Sub Move( _
       ByVal layer As Layer, _
       ByVal oids As IEnumerable(Of Long), _
       ByVal dx As Double, _
       ByVal dy As Double _
    ) 
    public void Move( 
       Layer layer,
       IEnumerable<long> oids,
       double dx,
       double dy
    )

    Parameters

    layer
    The layer of the features to move.
    oids
    The collection of oids
    dx
    Units along the x-axis to move the geometry.
    dy
    Units along the y-axis to move the geometry.
    Example
    Move features
    // Moves the shapes (geometries) of all selected features of a given feature layer of the active map view by a fixed offset.
    await QueuedTask.Run<bool>(() =>
      {
        double xOffset = 100; // specify your units along the x-axis to move the geometry
        double yOffset = 100; // specify your units along the y-axis to move the geometry
                              // If there are no selected features, return
        if (featureLayer.GetSelection().GetObjectIDs().Count == 0)
          return false;
        // set up a dictionary to store the layer and the object IDs of the selected features
        var selectionDictionary = new Dictionary<MapMember, List<long>>
          {
                { featureLayer, featureLayer.GetSelection().GetObjectIDs().ToList() }
          };
        var moveEditOperation = new EditOperation() { Name = "Move features" };
        moveEditOperation.Move(SelectionSet.FromDictionary(selectionDictionary), xOffset, yOffset);  //specify your units along axis to move the geometry
        if (!moveEditOperation.IsEmpty)
        {
          var result = moveEditOperation.Execute();
          return result; // return the operation result: true if successful, false if not
        }
        return false; // return false to indicate that the operation was not empty
      });
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also