ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MappingExtensions Class / GetTopologyAsync Method
The map to retrieve topology information from.
the geodatabase topology name or "Map" if map topology properties is required.
Example

In This Topic
    GetTopologyAsync Method
    In This Topic
    Gets the set of topology properties for the specified topology name.
    Syntax
    Public Shared Function GetTopologyAsync( _
       ByVal map As Map, _
       ByVal topologyName As String _
    ) As Task(Of TopologyProperties)
    public static Task<TopologyProperties> GetTopologyAsync( 
       Map map,
       string topologyName
    )

    Parameters

    map
    The map to retrieve topology information from.
    topologyName
    the geodatabase topology name or "Map" if map topology properties is required.
    Exceptions
    ExceptionDescription
    Map or topologyName is null
    Remarks
    Use "Map" to obtain the ArcGIS.Desktop.Editing.MapTopologyProperties for the map. Use the geodatabase topology name to obtain the ArcGIS.Desktop.Editing.GeodatabaseTopologyProperties for the map.
    Example
    Get map topology properties
    {
      // Retrieves the topology properties for the specified map asynchronously.
      var mapTopoProperties = await activeMap.GetTopologyAsync("Map") as MapTopologyProperties;
      var tolerance_m = mapTopoProperties.Tolerance;
      var defaultTolerance_m = mapTopoProperties.DefaultTolerance;
    }
    Get geodatabase topology properties by name
    // Asynchronously retrieves the properties of a geodatabase topology with the specified name from the given map.
    var topoProperties = await activeMap.GetTopologyAsync(topologyName) as GeodatabaseTopologyProperties;
    
    var workspace = topoProperties.WorkspaceName;
    var topoLayer = topoProperties.TopologyLayer;
    var clusterTolerance = topoProperties.ClusterTolerance;
    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.1 or higher.
    See Also