ArcGIS Pro 3.4 API Reference Guide
ArcGIS.Core.Data.NetworkDiagrams Namespace / NetworkDiagram Class / GetContent Method / GetContent(Boolean,Boolean,Boolean,Boolean) Method
Indicates whether to return diagram info.
Indicates whether to return geometries of the diagram features.
Indicates whether to return attributes of associated source objects.
Indicates whether to returns aggregations of diagram features.
Example

In This Topic
    GetContent(Boolean,Boolean,Boolean,Boolean) Method
    In This Topic
    Returns diagram information and content as a JSON string. This method must be called on the MCT. Use QueuedTask.Run.
    Syntax
    Public Overloads Function GetContent( _
       ByVal addDiagramInfo As Boolean, _
       ByVal addGeometries As Boolean, _
       ByVal addAttributes As Boolean, _
       ByVal addAggregations As Boolean _
    ) As String

    Parameters

    addDiagramInfo
    Indicates whether to return diagram info.
    addGeometries
    Indicates whether to return geometries of the diagram features.
    addAttributes
    Indicates whether to return attributes of associated source objects.
    addAggregations
    Indicates whether to returns aggregations of diagram features.

    Return Value

    The JSON string containing the diagram content.
    Exceptions
    ExceptionDescription
    A geodatabase-related exception has occurred.
    Remarks
    This JSON string can be used to transfer data into external systems, such as network calculation or analysis software.
    Example
    Get Network Diagram Information as JSON string
    public void GetDiagramContent(UtilityNetwork utilityNetwork)
    {
      using (DiagramManager diagramManager = utilityNetwork.GetDiagramManager())
      {
        // get a diagram by name
        NetworkDiagram diagram = diagramManager.GetNetworkDiagram(templateName);
    
        string json_content = diagram.GetContent(true, true, true, true);
      }
    }
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also