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

In This Topic
    CanSetActiveTopology(Map,TopologyProperties) 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 topologyProperties As TopologyProperties _
    ) As Boolean
    public static bool CanSetActiveTopology( 
       Map map,
       TopologyProperties topologyProperties
    )

    Parameters

    map
    The map to set the topology.
    topologyProperties
    A ArcGIS.Desktop.Editing.TopologyProperties
    Example
    Set the current topology by topologyProperties
    // Sets the active topology for the specified map using the provided geodatabase topology properties.
    var gdbTopoProperties = await activeMap.GetTopologyAsync("TopologyName") as GeodatabaseTopologyProperties;
    if (activeMap.CanSetActiveTopology(gdbTopoProperties))
    {
      await activeMap.SetActiveTopologyAsync(gdbTopoProperties);
    }
    Requirements

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

    ArcGIS Pro version: 3.1 or higher.
    See Also