ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Core.Data.NetworkDiagrams Namespace / NetworkDiagram Class / FindDiagramFeatures Method
The FindDiagramFeatureQuery used to search for diagram features.
Example

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

    Parameters

    query
    The FindDiagramFeatureQuery used to search for diagram features.

    Return Value

    Exceptions
    ExceptionDescription
    A geodatabase-related exception has occurred.
    Example
    Find Diagram Features for a set of utility network rows
    {
      // Given a list of utility network feature GlobalIDs, find the corresponding diagram features in a network diagram
      static void FindDiagramFeatures(NetworkDiagram diagram, List<Guid> globalIDs)
      {
        FindDiagramFeatureQuery featureQuery = new FindDiagramFeatureQuery();
        featureQuery.NetworkRowGlobalIDs = globalIDs;
        featureQuery.AddAggregations = true;
        featureQuery.AddConnectivityAssociations = true;
        featureQuery.AddStructuralAttachments = true;
    
        IReadOnlyList<FindResultItem> features = diagram.FindDiagramFeatures(featureQuery);
        foreach (FindResultItem findFeature in features)
        {
          long objectID = findFeature.ObjectID;
          Guid guid = findFeature.GlobalID;
          GeometryType geometryType = findFeature.GeometryType;
          int sourceID = findFeature.SourceID;
        }
      }
    }
    Requirements

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

    ArcGIS Pro version: 3.0 or higher.
    See Also