Return Value
The topology dataset associated with the layer.
| Exception | Description |
|---|---|
| ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
{
//Get the Topology of another Topology layer
var existingTopology = map.GetLayersAsFlattenedList().OfType<TopologyLayer>().FirstOrDefault();
if (existingTopology != null)
{
await QueuedTask.Run(() =>
{
var topology = existingTopology.GetTopology();
//Configure the settings for a new Catalog layer using the CatalogDataset of an existing layer
var topologyLyrParams = new TopologyLayerCreationParams(topology);
topologyLyrParams.Name = "NewTopologyLayerFromAnotherTopologyLayer";
topologyLyrParams.AddAssociatedLayers = true;
LayerFactory.Instance.CreateLayer<TopologyLayer>(topologyLyrParams, map);
});
}
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)