ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.NetworkDiagrams Namespace / NetworkDiagram Class / FindNetworkRows Method
The FindNetworkRowQuery used to search for network rows
Example

In This Topic
    FindNetworkRows Method
    In This Topic
    Gets a IReadOnlyList of FindResultItems corresponding to the input list of diagram feature global IDs. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    query
    The FindNetworkRowQuery used to search for network rows

    Return Value

    Exceptions
    ExceptionDescription
    A geodatabase-related exception has occurred.
    Example
    Find Utility Network Rows for a set of diagram features
    public void FindDiagramRows(NetworkDiagram diagram, List<Guid> globalIDs)
    {
      FindNetworkRowQuery rowQuery = new FindNetworkRowQuery();
      rowQuery.DiagramFeatureGlobalIDs = globalIDs;
      rowQuery.AddAggregations = true;
    
      IReadOnlyList<FindResultItem> rows = diagram.FindNetworkRows(rowQuery);
      foreach (var findRow in rows)
      {
        long objectID = findRow.ObjectID;
        Guid guid = findRow.GlobalID;
        GeometryType geometryType = findRow.GeometryType;
        int sourceID = findRow.SourceID;
      }
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also