ArcGIS Pro 3.8 API Reference Guide
ArcGIS.Desktop.Editing Namespace / TransformMethod Class / TransformType Property
Example

In This Topic
    TransformType Property
    In This Topic
    Gets or sets the type of transformation to perform.
    Syntax
    public TransformMethodType TransformType {get; set;}
    Public Property TransformType As TransformMethodType
    Example
    Edit Operation Transform Features
    // Transforms features from a source layer to a target layer using a specified transformation method.
    var transformMapView = MapView.Active;
    if (transformMapView == null)
      return;
    
    await QueuedTask.Run(() =>
      {
        //Transform features using EditOperation.Transform overloads
        var transformFeatures = new EditOperation() { Name = "Transform Features" };
    
        //Transform a selected set of features
        ////Perform an affine transformation
        //transformFeatures.TransformAffine(featureLayer, linkLayer);
        var affine_transform = new TransformByLinkLayer()
        {
          LinkLayer = linkLayer,
          TransformType = TransformMethodType.Affine //TransformMethodType.Similarity
        };
        //Transform a selected set of features
        transformFeatures.Transform(transformMapView.GetFeatures(polygon), affine_transform);
        //Perform an affine transformation
        transformFeatures.Transform(featureLayer, affine_transform);
        //Execute to execute the operation
        //Must be called within QueuedTask.Run
        if (!transformFeatures.IsEmpty)
        {
          //Execute and ExecuteAsync will return true if the operation was successful and false if not
          var result = transformFeatures.Execute();
          //or use async flavor
          //await transformFeatures.ExecuteAsync();
        }
      });
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also