ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.Topology Namespace / TopologyGraph Class / GetNodes Method / GetNodes(Feature) Method
The ArcGIS.Core.Data.Feature that spawns a specific set of topological nodes.
Example

In This Topic
    GetNodes(Feature) Method
    In This Topic
    Gets the set of TopologyNodes corresponding to the feature specified by parentFeature. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    parentFeature
    The ArcGIS.Core.Data.Feature that spawns a specific set of topological nodes.

    Return Value

    A list of TopologyNodes that correspond to parentFeature.
    Exceptions
    ExceptionDescription
    A geodatabase-related exception has occurred.
    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");
        });
      });
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also