Export Diagram Layer Definition (Network Diagram)

Summary

Exports the diagram layer definition currently set up for the input diagram layer into a network diagram layer definition file (.ndld).

Usage

  • This tool is not supported when working with a utility network service. You must work with either a utility network or trace network in a file geodatabase or a database connection to a utility network in an enterprise geodatabase. When working with an enterprise geodatabase, the connection must be established as the database utility network owner.

  • The input network diagram layer must be from either a utility network or trace network in a file geodatabase or a database connection to a utility network in an enterprise geodatabase.

  • The tool creates an output network diagram layer definition file (.ndld). The definition file stores all layer and labelling properties of each layer under the input network diagram layer. The Import Diagram Template Definitions tool can be used to apply the template across other layers so that they display in the same way.

  • Since this tool works from an input network diagram layer in the active map, it can be used in ArcGIS Pro only.

Syntax

ExportDiagramLayerDefinition(in_network_diagram_layer, out_ndld_file)
ParameterExplanationData Type
in_network_diagram_layer

The network diagram layer from which the layer definition will be exported.

Diagram Layer
out_ndld_file

The network diagram layer definition file (.ndld) to be created.

File

Derived Output

NameExplanationData Type
out_network_diagram_layer

The output network diagram layer.

Diagram Layer

Code sample

ExportDiagramLayerDefinition example (Python window)

Export the layer definition related to the currently displayed diagram layer.

import arcpy
arcpy.ExportDiagramLayerDefinition_nd("Temporary diagram", 
                                      "D:/MyProjectLocation/CollapseContainerLayer.ndld")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics