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 or trace network service. You must use either a utility network or trace network in a file geodatabase or a database connection to a utility network or trace network in an enterprise geodatabase. When working with an enterprise geodatabase the following are requirements:
- The Input Network parameter value must be from a database connection established as the database utility network owner or database trace network owner.
- The connected ArcGIS Enterprise portal account must be the portal utility network owner or portal trace network owner.
- This tool must be connected to the default version, which is expected to be public and not protected.
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
arcpy.nd.ExportDiagramLayerDefinition(in_network_diagram_layer, out_ndld_file)
Parameter | Explanation | Data 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
Name | Explanation | Data Type |
out_network_diagram_layer | The output network diagram layer. | Diagram Layer |
Code sample
Export the layer definition related to the currently displayed diagram layer.
import arcpy
arcpy.ExportDiagramLayerDefinition_nd("Temporary diagram",
"D:/MyProjectLocation/CollapseContainerLayer.ndld")
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes