Skip To Content

Export Diagram Content

Summary

Exports diagram content in a simple format (JSON file) that reflects basic connectivity. Additional optional information such as diagram properties, diagram feature geometry, utility network elements attributes, and aggregated elements can also be exported.

Usage

  • The exported JSON file can be used for network calculation and analysis, or to feed external systems.

Syntax

ExportDiagramContent_un (in_utility_network, network_diagram_name, out_file, {include_diagram_properties}, {include_geometries}, {include_attributes}, {include_aggregations})
ParameterExplanationData Type
in_utility_network

The utility network layer or utility network data element related to the network diagram to export.

Utility Network; Utility Network Layer
network_diagram_name

The name of the network diagram to export.

String
out_file

The output JSON file to create with the exported diagram content.

File
include_diagram_properties
(Optional)

Specifies whether to export the diagram properties.

  • INCLUDE_DIAGRAM_PROPERTIESThe process exports the diagram properties (statistics, creation and update dates, and so on).
  • EXCLUDE_DIAGRAM_PROPERTIESThe process doesn't export the diagram properties. This is the default.
Boolean
include_geometries
(Optional)

Specifies whether to export the geometry of the diagram features.

  • INCLUDE_GEOMETRIESThe process exports each diagram feature with its geometry.
  • EXCLUDE_GEOMETRIESThe process exports each diagram feature without its geometry. This is the default.
Boolean
include_attributes
(Optional)

Specifies whether to export the attributes of the associated utility network features.

  • INCLUDE_ATTRIBUTESThe process exports the attributes of the utility network feature associated with each diagram feature.
  • EXCLUDE_ATTRIBUTESThe process doesn't export the associated utility network feature attributes. This is the default.
Boolean
include_aggregations
(Optional)

Specifies whether to export each diagram feature with the list of the utility network elements it aggregates.

  • INCLUDE_AGGREGATIONSThe process exports each diagram feature with the list of the utility network elements it aggregates with their asset group and asset type values.
  • EXCLUDE_AGGREGATIONSThe process doesn't export the diagram feature aggregations. This is the default.
Boolean

Code sample

ExportDiagramContent example (Python window)

Export Basic_RMT003 diagram content with the feature geometries, attributes, aggregations and the diagram properties.

import arcpy
arcpy.ExportDiagramContent('elec Utility Network', 'Basic_RMT003', 
                           'C:\temp\BasicRMT003.json', 
                           'INCLUDE_DIAGRAM_PROPERTIES', 'INCLUDE_GEOMETRIES', 
                           'INCLUDE_ATTRIBUTES', 'INCLUDE_AGGREGATIONS')

Environments

This tool does not use any geoprocessing environments.

Licensing information

  • Basic: No
  • Standard: Yes
  • Advanced: Yes