ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MappingExtensions Class / GetAvailableTopologiesAsync Method
The map to retrieve the topology proeprties for.
Example Version

GetAvailableTopologiesAsync Method
Gets the list of available topologies for the map. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public static Task<IReadOnlyList<TopologyProperties>> GetAvailableTopologiesAsync( 
   Map map
)

Parameters

map
The map to retrieve the topology proeprties for.

Return Value

The list of topology properties for the map.
Exceptions
ExceptionDescription
Map is null
This method or property must be called within the lambda passed to QueuedTask.Run.
Remarks
Topologies are only supported if the map is a 2D non-stereo map. If the map contains geodatabase topology layers then geodatabase topology properties are also returned.
Example
Get List of available topologies in the map
QueuedTask.Run(async () =>
{
  var map = MapView.Active.Map;
  //Get a list of all the available topologies for the map
  var availableTopologies = await map.GetAvailableTopologiesAsync();

  var gdbTopologies = availableTopologies.OfType<GeodatabaseTopologyProperties>();
  var mapTopologies = availableTopologies.OfType<MapTopologyProperties>();
});
Requirements

Target Platforms: Windows 11, Windows 10

ArcGIS Pro version: 3.1 or higher.
See Also