ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Rotate Method / Rotate(SelectionSet,MapPoint,Double) Method
A set of features to rotate
The origin around which the geometry will be rotated.
The rotation angle in radians
Example

In This Topic
    Rotate(SelectionSet,MapPoint,Double) Method
    In This Topic
    Rotates a set of features.
    Syntax
    Public Overloads Sub Rotate( _
       ByVal features As SelectionSet, _
       ByVal origin As MapPoint, _
       ByVal angle As Double _
    ) 
    public void Rotate( 
       SelectionSet features,
       MapPoint origin,
       double angle
    )

    Parameters

    features
    A set of features to rotate
    origin
    The origin around which the geometry will be rotated.
    angle
    The rotation angle in radians
    Example
    Edit Operation Rotate Features
    // Rotates the selected features by a specified angle.
    await QueuedTask.Run(() =>
      {
        var rotateFeatures = new EditOperation() { Name = "Rotate Features" };
    
        //Rotate works on a selected set of features
        //Get all features that intersect a polygon
        //Rotate selected features 90 deg about "origin"
        rotateFeatures.Rotate(MapView.Active.GetFeatures(polygon), origin, angle);
    
        //Execute to execute the operation
        //Must be called within QueuedTask.Run
        if (!rotateFeatures.IsEmpty)
        {
          //Execute and ExecuteAsync will return true if the operation was successful and false if not
          var result = rotateFeatures.Execute();
          //or use async flavor
          //await rotateFeatures.ExecuteAsync();
        }
      });
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also