ArcGIS Pro 3.1 API Reference Guide
ArcGIS.Core.Data.Topology Namespace / TopologyEdge Class
Members Example

In This Topic
    TopologyEdge Class
    In This Topic
    Represents a topological edge within a topology graph.
    Object Model
    TopologyEdge ClassTopologyNode ClassGeometry ClassTopologyNode Class
    Syntax
    Example
    Build Map Topology
    private async Task BuildGraphWithActiveView()
    {
      await QueuedTask.Run(() =>
      {
        //Build the map topology graph
        MapView.Active.BuildMapTopologyGraph<TopologyDefinition>(async topologyGraph =>
        {
          //Getting the nodes and edges present in the graph
          var topologyGraphNodes = topologyGraph.GetNodes();
          var topologyGraphEdges = topologyGraph.GetEdges();
    
          foreach (var node in topologyGraphNodes)
          {
            // do something with the node
          }
          foreach (var edge in topologyGraphEdges)
          {
            // do something with the edge
          }
    
          MessageBox.Show($"Number of topo graph nodes are:  {topologyGraphNodes.Count}.\n Number of topo graph edges are {topologyGraphEdges.Count}.", "Map Topology Info");
        });
      });
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Core.CoreObjectsBase
          ArcGIS.Core.Data.Topology.TopologyElement
             ArcGIS.Core.Data.Topology.TopologyEdge

    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3.0 or higher.
    See Also