ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Editing Namespace / TransformByLinkLayer Class / TransformByLinkLayer Constructor
Example

In This Topic
    TransformByLinkLayer Constructor
    In This Topic
    Constructs a new TransformByLinkLayer object.
    Syntax
    Public Function New()
    public TransformByLinkLayer()
    Example
    Edit Operation Transform Features
    // Transforms features from a source layer to a target layer using a specified transformation method.
    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(MapView.Active.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