Scale(SelectionSet,MapPoint,Double,Double,Double) Method
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();
Target Platforms: Windows 11, Windows 10
ArcGIS Pro version: 3 or higher.