ArcGIS Pro 3.0 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
    
    moveFeature.Execute();
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also