ArcGIS Pro 3.0 API Reference Guide
ArcGIS.Core.CIM Namespace / CIMBaseLayer Class / LayerMasks Property
Example

In This Topic
    LayerMasks Property
    In This Topic
    Gets or sets the URIs of the layers used as masks.
    Syntax
    public string[] LayerMasks {get; set;}
    Public Property LayerMasks As String()
    Example
    Mask feature
    //Get the layer to be masked
    var lineLyrToBeMasked = MapView.Active.Map.Layers.FirstOrDefault(lyr => lyr.Name == "TestLine") as FeatureLayer;
    //Get the layer's definition
    var lyrDefn = lineLyrToBeMasked.GetDefinition();
    //Create an array of Masking layers (polygon only)
    //Set the LayerMasks property of the Masked layer
    lyrDefn.LayerMasks = new string[] { "CIMPATH=map3/testpoly.xml" };
    //Re-set the Masked layer's defintion
    lineLyrToBeMasked.SetDefinition(lyrDefn);
    Requirements

    Target Platforms: Windows 11, Windows 10, Windows 8.1

    See Also