ArcGIS Pro 3.3 API Reference Guide
ArcGIS.Desktop.Editing Namespace / EditOperation Class / Scale Method / Scale(SelectionSet,MapPoint,Double,Double,Double) Method
A set of features to scale.
The origin around which the geometry will be scaled.
The scale factor along the x-axis.
The scale factor along the y-axis.
The scale factor along the z-axis.
Example

In This Topic
    Scale(SelectionSet,MapPoint,Double,Double,Double) Method
    In This Topic
    Scales a set of features.
    Syntax
    Public Overloads Sub Scale( _
       ByVal features As SelectionSet, _
       ByVal origin As MapPoint, _
       ByVal sx As Double, _
       ByVal sy As Double, _
       ByVal sz As Double _
    ) 

    Parameters

    features
    A set of features to scale.
    origin
    The origin around which the geometry will be scaled.
    sx
    The scale factor along the x-axis.
    sy
    The scale factor along the y-axis.
    sz
    The scale factor along the z-axis.
    Example
    Edit Operation Scale Features
    var scaleFeatures = new EditOperation() { Name = "Scale Features" };
    
    //Rotate works on a selected set of features
    
    //var scaleSelection = MapView.Active.GetFeatures(polygon).Select(
    //    k => new KeyValuePair<MapMember, List<long>>(k.Key as MapMember, k.Value));
    //scaleFeatures.Scale(scaleSelection, origin, 2.0, 2.0, 0.0);
    
    //Scale the selected features by 2.0 in the X and Y direction
    scaleFeatures.Scale(MapView.Active.GetFeatures(polygon), origin, 2.0, 2.0, 0.0);
    
    //Execute to execute the operation
    //Must be called within QueuedTask.Run
    if (!scaleFeatures.IsEmpty)
    {
      var result = scaleFeatures.Execute(); //Execute and ExecuteAsync will return true if the operation was successful and false if not
    }
    
    //or use async flavor
    //await scaleFeatures.ExecuteAsync();
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also