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

In This Topic
    GetAvailableTopologiesAsync Method
    In This Topic
    Gets the list of available topologies for the map. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Shared Function GetAvailableTopologiesAsync( _
       ByVal map As Map _
    ) As Task(Of IReadOnlyList(Of TopologyProperties))
    public static Task<IReadOnlyList<TopologyProperties>> GetAvailableTopologiesAsync( 
       Map map
    )

    Parameters

    map
    The map to retrieve the topology properties 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
    // Retrieves and processes the list of available topologies in the active map.
    await 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 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.1 or higher.
    See Also