Public Function New( _ ByVal catalogDS As CatalogDataset _ )
public CatalogLayerCreationParams( CatalogDataset catalogDS )
Parameters
- catalogDS
- A ArcGIS.Core.Data.Mapping.CatalogDataset object.
Public Function New( _ ByVal catalogDS As CatalogDataset _ )
public CatalogLayerCreationParams( CatalogDataset catalogDS )
{
//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'");
//Note: Needs QueuedTask to run
LayerFactory.Instance.CreateLayer<CatalogLayer>(catalogLyrParams, MapView.Active.Map);
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)