Label | Explanation | Data Type |
Input Network
or Network Diagram Layer | The utility network or trace network layer, utility network or trace network data element, or network diagram layer related to the network diagram to export. | Utility Network; Trace Network; Utility Network Layer; Trace Network Layer; Diagram Layer |
Network Diagram Name
| The name of the network diagram to export. | String |
Output File
| The output .json file that will be created with the exported diagram content. | File |
Include diagram properties
(Optional) | Specifies whether the diagram properties will be exported.
| Boolean |
Include geometries
(Optional) | Specifies whether the geometry of the diagram features will be exported.
| Boolean |
Include attributes
(Optional) | Specifies whether the attributes of the associated network elements will be exported.
| Boolean |
Include aggregations
(Optional) | Specifies whether each diagram feature will be exported with a list of network elements it aggregates.
| Boolean |
Use domain and subtype descriptions
(Optional) | Specifies how coded domain and subtype values will be exported. This parameter is enabled when the Include attributes or Include aggregations parameter is checked.
| Boolean |
Summary
Exports diagram content in a simple format (JSON) that reflects basic connectivity. Additional optional information such as diagram properties, diagram feature geometry, network elements attributes, and aggregated elements can also be exported.
Note:
The input network or diagram layer can be from a utility network or trace network in a file geodatabase, a utility network service, a trace network service, or a database connection to a utility network or trace network in an enterprise geodatabase.
Usage
The exported .json file can be used for network calculation and analysis or to feed external systems.
When exporting diagram content with attributes, attributes with coded domain values can be exported as either raw values or string descriptions.
Parameters
arcpy.nd.ExportDiagramContent(in_utility_network, network_diagram_name, out_file, {include_diagram_properties}, {include_geometries}, {include_attributes}, {include_aggregations}, {use_domains})
Name | Explanation | Data Type |
in_utility_network | The utility network or trace network layer, utility network or trace network data element, or network diagram layer related to the network diagram to export. | Utility Network; Trace Network; Utility Network Layer; Trace Network Layer; Diagram Layer |
network_diagram_name | The name of the network diagram to export. | String |
out_file | The output .json file that will be created with the exported diagram content. | File |
include_diagram_properties (Optional) | Specifies whether the diagram properties will be exported.
| Boolean |
include_geometries (Optional) | Specifies whether the geometry of the diagram features will be exported.
| Boolean |
include_attributes (Optional) | Specifies whether the attributes of the associated network elements will be exported.
| Boolean |
include_aggregations (Optional) | Specifies whether each diagram feature will be exported with a list of network elements it aggregates.
| Boolean |
use_domains (Optional) | Specifies how coded domain and subtype values will be exported. This parameter is enabled when the include_attributes parameter is set to INCLUDE_ATTRIBUTES or the include_aggregations parameter is set to INCLUDE_AGGREGATIONS.
| Boolean |
Code sample
Export Basic_RMT003 diagram content with the feature geometries, attributes with their string description for coded domain and subtype values, aggregations, and diagram properties.
import arcpy
arcpy.ExportDiagramContent_nd('elec Network', 'Basic_RMT003',
'C:\temp\BasicRMT003.json',
'INCLUDE_DIAGRAM_PROPERTIES', 'INCLUDE_GEOMETRIES',
'INCLUDE_ATTRIBUTES', 'INCLUDE_AGGREGATIONS',
'USE_CODED_VALUE_NAMES')
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes