Parameters
- uri
- A System.Uri represents the path or url to a dataset or .lyrx or .lpkx file.
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 |
//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);
Target Platforms: Windows 11, Windows 10