ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / CatalogLayerCreationParams Class / CatalogLayerCreationParams Constructor / CatalogLayerCreationParams Constructor(Uri)
A System.Uri represents the path or url to a dataset or .lyrx or .lpkx file.
Example

In This Topic
    CatalogLayerCreationParams Constructor(Uri)
    In This Topic
    Creates a parameter object with a System.Uri.
    Syntax
    public CatalogLayerCreationParams( 
       Uri uri
    )
    Public Function New( _
       ByVal uri As Uri _
    )

    Parameters

    uri
    A System.Uri represents the path or url to a dataset or .lyrx or .lpkx file.
    Remarks

    Some sample paths to:

    A CatalogDataset in a FileGeodatabase C:\Data\MyFileGDB.gdb\Hurricane_CatalogDS
    A CatalogDataset from a SDE C:\Connections\MySDEConnection.sde\Hurricane_CatalogDS

    Example
    Create Catalog Layer using Uri to a Catalag Feature Class
    //Note: Call within QueuedTask.Run()
    var createParams = new CatalogLayerCreationParams(new Uri(@"C:\CatalogLayer\CatalogDS.gdb\HurricaneCatalogDS"));
    //Set the definition query
    createParams.DefinitionQuery = new DefinitionQuery("Query1", "cd_itemname = 'PuertoRico'");
    //Set name of the new Catalog Layer
    createParams.Name = "PuertoRico";
    //Create Layer
    var catalogLayer = LayerFactory.Instance.CreateLayer<CatalogLayer>(createParams, MapView.Active.Map);
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also