ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Move Method / Move(SelectionSet,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.
Example

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

    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.
    Example
    Move features
    //Get all of the selected ObjectIDs from the layer.
    var firstLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<FeatureLayer>().FirstOrDefault();
    var selectionfromMap = firstLayer.GetSelection();
    
    // set up a dictionary to store the layer and the object IDs of the selected features
    var selectionDictionary = new Dictionary<MapMember, List<long>>();
    selectionDictionary.Add(firstLayer as MapMember, selectionfromMap.GetObjectIDs().ToList());
    
    var moveFeature = new EditOperation();
    moveFeature.Name = "Move features";
    //at 2.x - moveFeature.Move(selectionDictionary, 10, 10);  //specify your units along axis to move the geometry
    moveFeature.Move(SelectionSet.FromDictionary(selectionDictionary), 10, 10);  //specify your units along axis to move the geometry
    if (!moveFeature.IsEmpty)
    {
      var result = moveFeature.Execute(); //Execute and ExecuteAsync will return true if the operation was successful and false if not
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also