ArcGIS Pro 3.2 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 static Task<TopologyProperties> GetTopologyAsync( 
       Map map,
       string topologyName
    )
    Public Shared Function GetTopologyAsync( _
       ByVal map As Map, _
       ByVal topologyName As String _
    ) As Task(Of TopologyProperties)

    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 geoddatabase topology name to obtain the ArcGIS.Desktop.Editing.GeodatabaseTopologyProperties for the map.
    Example
    Get map topology properties
    var mapTopoProperties = await map.GetTopologyAsync("Map") as MapTopologyProperties;
    var tolerance_m = mapTopoProperties.Tolerance;
    var defaultTolerance_m = mapTopoProperties.DefaultTolerance;
    Get geodatabase topology properties by name
    var topoProperties = await map.GetTopologyAsync("TopologyName") as GeodatabaseTopologyProperties;
    
    var workspace = topoProperties.WorkspaceName;
    var topoLayer = topoProperties.TopologyLayer;
    var clusterTolerance = topoProperties.ClusterTolerance;
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also