ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / MappingExtensions Class / CanSetActiveTopology Method / CanSetActiveTopology(Map,String) Method
The map to set the topology.
the geodatabase topology name or "Map" if map topology properties is required.
Example

In This Topic
    CanSetActiveTopology(Map,String) Method
    In This Topic
    Gets if the active topology can be set. Topologies are only supported for 2D non-stereo maps.
    Syntax
    Public Overloads Shared Function CanSetActiveTopology( _
       ByVal map As Map, _
       ByVal topologyName As String _
    ) As Boolean
    public static bool CanSetActiveTopology( 
       Map map,
       string topologyName
    )

    Parameters

    map
    The map to set the topology.
    topologyName
    the geodatabase topology name or "Map" if map topology properties is required.
    Remarks
    Use "Map" to set the ArcGIS.Desktop.Editing.MapTopologyProperties for the map. Use the geodatabase topology name to set the ArcGIS.Desktop.Editing.GeodatabaseTopologyProperties for the map.
    Example
    Set the current topology by name
    // Sets the active topology for the specified map to the topology with the given name asynchronously.
    if (activeMap.CanSetActiveTopology(topologyName))
    {
      await activeMap.SetActiveTopologyAsync(topologyName);
    }
    Requirements

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

    ArcGIS Pro version: 3.1 or higher.
    See Also