ArcGIS Pro 3.7 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 Function New( _
       ByVal item As Item _
    )
    public LayerCreationParams( 
       Item 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;
            //Note: Needs QueuedTask to run
            //Create a feature layer for the map note
            var layerCreated = LayerFactory.Instance.CreateLayer<Layer>(layer_params, MapView.Active.Map);
        }
    }
    Create a Scene Layer
    {
      // Note: call within QueuedTask.Run()
      {
        //Create with initial visibility set to false. Add to current scene
        var createparams = new LayerCreationParams(new Uri(sceneLayerUrl, UriKind.Absolute))
        {
          IsVisible = false
        };
    
        //cast to specific type of scene layer being created - in this case FeatureSceneLayer
        var sceneLayer = LayerFactory.Instance.CreateLayer<Layer>(
                 createparams, MapView.Active.Map) as FeatureSceneLayer;
        //or...specify the cast directly
        var sceneLayer2 = LayerFactory.Instance.CreateLayer<FeatureSceneLayer>(
                 createparams, MapView.Active.Map);
        //ditto for BuildingSceneLayer, PointCloudSceneLayer, IntegratedMeshSceneLayer
        //...
      }
    }
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also