ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / LayerCreationParams Class / LayerCreationParams Constructor / LayerCreationParams Constructor(Item)
A ArcGIS.Desktop.Core.Item object.
Example

In This Topic
    LayerCreationParams Constructor(Item)
    In This Topic
    Creates a parameter object with ArcGIS.Desktop.Core.Item.
    Syntax
    public LayerCreationParams( 
       Item item
    )
    Public Function New( _
       ByVal item As Item _
    )

    Parameters

    item
    A ArcGIS.Desktop.Core.Item object.
    Example
    Add MapNotes to the active map
    //Gets the collection of layer template packages installed with Pro for use with maps
    var items = MapView.Active.Map.LayerTemplatePackages;
    //Iterate through the collection of items to add each Map Note to the active map
    foreach (var item in items)
    {
      //Create a parameter item for the map note
      var layer_params = new LayerCreationParams(item);
      layer_params.IsVisible = false;
      await QueuedTask.Run(() =>
      {
        //Create a feature layer for the map note
        var layer = LayerFactory.Instance.CreateLayer<Layer>(layer_params, MapView.Active.Map);
      });
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also