public CatalogDataset GetCatalogDataset()
Public Function GetCatalogDataset() As CatalogDataset
Return Value
A FeatureClass.
public CatalogDataset GetCatalogDataset()
Public Function GetCatalogDataset() As CatalogDataset
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
//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); }
Target Platforms: Windows 11, Windows 10