ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Move Method / Move(SelectionSet,Double,Double,Double) Method
A set of features to move.
Units along the x-axis to move the geometry.
Units along the y-axis to move the geometry.
Units along the z-axis to move the geometry.
Example

In This Topic
    Move(SelectionSet,Double,Double,Double) Method
    In This Topic
    Moves a set of features all along the same vector.
    Syntax
    Public Overloads Sub Move( _
       ByVal features As SelectionSet, _
       ByVal dx As Double, _
       ByVal dy As Double, _
       ByVal dz As Double _
    ) 
    public void Move( 
       SelectionSet features,
       double dx,
       double dy,
       double dz
    )

    Parameters

    features
    A set of features to move.
    dx
    Units along the x-axis to move the geometry.
    dy
    Units along the y-axis to move the geometry.
    dz
    Units along the z-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