ArcGIS Pro 3.0 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, Windows 8.1

    See Also