ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MappingExtensions Class / SetActiveTopologyAsync Method / SetActiveTopologyAsync(Map,TopologyProperties) Method
The map to set the topology.
A ArcGIS.Desktop.Editing.TopologyProperties
Example

In This Topic
    SetActiveTopologyAsync(Map,TopologyProperties) Method
    In This Topic
    Sets the active topology for the map to the set of specified topology properties.
    Syntax
    public static Task<TopologyProperties> SetActiveTopologyAsync( 
       Map map,
       TopologyProperties topologyProperties
    )
    Public Overloads Shared Function SetActiveTopologyAsync( _
       ByVal map As Map, _
       ByVal topologyProperties As TopologyProperties _
    ) As Task(Of TopologyProperties)

    Parameters

    map
    The map to set the topology.
    topologyProperties
    A ArcGIS.Desktop.Editing.TopologyProperties
    Exceptions
    ExceptionDescription
    Active topology cannot be set with the specified topology properties.
    Example
    Set the current topology by topologyProperties
    if (map.CanSetActiveTopology(gdbTopoProperties))
    {
      await map.SetActiveTopologyAsync(gdbTopoProperties);
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.1 or higher.
    See Also