ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / CatalogLayerCreationParams Class / CatalogLayerCreationParams Constructor / CatalogLayerCreationParams Constructor(CatalogDataset)
A ArcGIS.Core.Data.Mapping.CatalogDataset object.
Example

In This Topic
    CatalogLayerCreationParams Constructor(CatalogDataset)
    In This Topic
    Creates a parameter object with a ArcGIS.Core.Data.Mapping.CatalogDataset.
    Syntax
    public CatalogLayerCreationParams( 
       CatalogDataset catalogDS
    )
    Public Function New( _
       ByVal catalogDS As CatalogDataset _
    )

    Parameters

    catalogDS
    A ArcGIS.Core.Data.Mapping.CatalogDataset object.
    Example
    Create Catalog Layer using CatalogDataset
    //Note: Call within QueuedTask.Run()
    //Get the CatalogDataset of another Catalog layer
    var existingCatalogLayer = MapView.Active.Map.GetLayersAsFlattenedList().OfType<CatalogLayer>().FirstOrDefault();
    if (existingCatalogLayer != null)
    {
      var catalogDataset = existingCatalogLayer.GetCatalogDataset();
      //Configure the settings for a new Catalog layer using the CatalogDataset of an existing layer
      var catalogLyrParams = new CatalogLayerCreationParams(catalogDataset);
      catalogLyrParams.Name = "NewCatalogLayerFromAnotherCatalogLayer";
      catalogLyrParams.DefinitionQuery = new DefinitionQuery("Query1", "cd_itemname = 'Asia'");
      LayerFactory.Instance.CreateLayer<CatalogLayer>(catalogLyrParams, MapView.Active.Map);
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also