ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Core.Data.NetworkDiagrams Namespace / NetworkDiagram Class / Extend Method / Extend(NetworkDiagramExtendType,IEnumerable<Guid>) Method
The NetworkDiagramExtendType used to extend the diagram.
An enumerable containing the global IDs of the diagram features used as input for extending the diagram.
Example

In This Topic
    Extend(NetworkDiagramExtendType,IEnumerable<Guid>) Method
    In This Topic
    Extends this network diagram starting from a list of input feature global IDs. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax

    Parameters

    extendType
    The NetworkDiagramExtendType used to extend the diagram.
    globalIDs
    An enumerable containing the global IDs of the diagram features used as input for extending the diagram.
    Exceptions
    ExceptionDescription
    A geodatabase-related exception has occurred.
    Remarks
    This routine generates its own editing transaction, and therefore cannot be wrapped in a separate transaction. Because the editing performed by this routine cannot be undone, this routine can also not be called within an editing session. All edits in the current edit session must be saved or discarded before calling this routine.
    Example
    Editing Network Diagram
    public void EditDiagram(NetworkDiagram diagram, List<Guid> globalIDs)
    {
      //     These routines generate their own editing transaction, and therefore cannot be wrapped
      //     in a separate transaction. Because the editing performed by these routines cannot
      //     be undone, thise routines can also not be called within an editing session. All
      //     edits in the current edit session must be saved or discarded before calling these
      //     routines.
    
      // refresh the diagram - synchronizes it based on the latest network topology
      diagram.Update();
    
      // append features to the diagram
      diagram.Append(globalIDs);
    
      // overite the diagram with a set of features 
      diagram.Overwrite(globalIDs);
    
      NetworkDiagramInfo info = diagram.GetDiagramInfo();
      if (info.CanExtend)
      {
        diagram.Extend(NetworkDiagramExtendType.ExtendByContainment);
    
        // or extend for only a set of utility network globalIDs
        diagram.Extend(NetworkDiagramExtendType.ExtendByContainment, globalIDs);
      }
      // delete a diagran
      diagram.Delete();
    }
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also