ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LayerDocument Class / LayerDocument Constructor / LayerDocument Constructor(MapMember)
Example

In This Topic
    LayerDocument Constructor(MapMember)
    In This Topic
    Creates LayerDocument instance from a MapMember object This constructor must be called on the MCT. Use QueuedTask.Run.
    Syntax
    public LayerDocument( 
       MapMember mapMember
    )
    Public Function New( _
       ByVal mapMember As MapMember _
    )

    Parameters

    mapMember
    Example
    Create a Lyrx file
    LayerDocument layerDocument = new LayerDocument(layer);
    layerDocument.Save(@"c:\Data\MyLayerDocument.lyrx");
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also