Create Diagram Layer Definition (Network Diagram)

Summary

Creates a diagram layer definition for the input diagram template, taking into consideration the settings of the network feature layers present in the active map.

This tool allows you to do the following:

  • Import the appearance and labeling settings configured on each feature layer present in the active map when those layers are related to the utility network or trace network specified in the input.
  • Control the creation of a set of extra layers that can be relevant or not to your template—such as layers for system junctions, structural attachments, and so on.

Caution:

This tool is a configuration and administration tool.

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.

  • When performing this operation on a utility network in an enterprise geodatabase, the connected ArcGIS Enterprise portal account must be the portal utility network owner.

  • The network layer specified for the input network parameter 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.

  • This tool must be used in ArcGIS Pro, as it takes an input network layer referenced from an active map and prepares the network diagram composite layer for all diagrams that are based on the input template according to the layers in the input active map. After running with its default settings, each network diagram based on the input template displays the following:

    • One layer for each utility network or trace network layer representing network features or network objects in the active map specified as the input.
    • A set of extra layers that can be relevant or not to your template dedicated to the representation of the following types of network elements:
      • Connectivity associations and structural attachments represented as polylines in diagrams
      • Container polygon features, line features, and edge objects that can be transformed as points in diagrams
      • Container point features and container junction objects that can be transformed as polygons in diagrams
      • Junction objects represented as points in diagrams
      • Edge objects represented as polylines in diagrams
    • One layer, Reduction Edges, dedicated to the representation of aggregated network elements between two junctions.

  • This tool is often used to initialize a custom diagram layer definition on a template. Then, you can refine the diagram layer definition set up on a template.

Syntax

CreateDiagramLayerDefinition(in_utility_network, template_name, {system_junctions}, {connectivity_associations}, {structural_attachments}, {reduction_edges}, {point_subLayers}, {polygon_subLayers}, {junction_object_point_subLayers}, {edge_object_polyline_subLayers})
ParameterExplanationData Type
in_utility_network

The utility network or trace network layer in the active map.

Utility Network Layer; Trace Network Layer
template_name

The name of the diagram template to modify.

String
system_junctions
(Optional)

Specifies whether system junctions will be represented in the diagrams based on the specified template.

  • SHOWThe diagram layer will include two layers—a System Junctions layer and a System Junction Objects layer—to represent the system junctions along the network lines and the system junction objects along the network edge objects in the diagrams. This is the default.
  • HIDENo layer will exist under the diagram layer to represent the system junctions and the system junction objects in the diagrams.
Boolean
connectivity_associations
(Optional)

Specifies whether connectivity associations will be represented in the diagrams based on the specified template.

  • SHOWThe diagram layer will include a Connectivity Associations layer to represent the connectivity associations in the diagrams. This is the default.
  • HIDENo layer will exist under the diagram layer to represent the connectivity associations in the diagrams.
Boolean
structural_attachments
(Optional)

Specifies whether structural attachment associations will be represented in the diagrams based on the specified template.

  • SHOWThe diagram layer will include a Structural Attachments layer to represent the structural attachment associations in the diagrams. This is the default.
  • HIDENo layer will exist under the diagram layer to represent the structural attachment associations in the diagrams.
Boolean
reduction_edges
(Optional)

Specifies whether reduction edges will be represented in the diagrams based on the specified template.

  • SHOWThe diagram layer will include a Reduction Edges layer to represent the reduction edges in the diagrams. This is the default.
  • HIDENo layer will exist under the diagram layer to represent the reduction edges in the diagrams.
Boolean
point_subLayers
[[Name, Subtype Layer],...]
(Optional)

Specifies whether layers will be added to represent container polygon features, network line features, or network edge objects as point features in the diagrams.

  • True—The layer will be created with subtype group layers.
  • False—The layer will be created as a simple layer. This is the default.

Value Table
polygon_subLayers
[[Name, Subtype Layer],...]
(Optional)

Specifies whether layers will be added to represent container point features or container junction objects as polygon features in the diagrams:

  • True—The layer will be created with subtype group layers.
  • False—The layer will be created as a simple layer. This is the default.

Value Table
junction_object_point_subLayers
[[Name, Subtype Layer],...]
(Optional)

Specifies whether layers will be added to represent junction objects as point features in the diagrams:

  • True—The layer will be created with subtype group layers.
  • False—The layer will be created as a simple layer. This is the default.

Value Table
edge_object_polyline_subLayers
[[Name, Subtype Layer],...]
(Optional)

Specifies whether layers will be added to represent edge objects as polyline features in the diagrams.

The second column is used as follows:

  • True—The layer will be created with subtype group layers.
  • False—The layer will be created as a simple layer. This is the default.

Value Table

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network or trace network layer.

Utility Network Layer; Trace Network Layer
out_template_name

The name of the diagram template.

String

Code sample

CreateDiagramLayerDefinition example (Python window)

Create a basic diagram layer definition on the template named MyTemplate1 related to the input network.

import arcpy
arcpy.CreateDiagramLayerDefinition_nd(input_Network, "MyTemplate1", 
                                      "SHOW", "SHOW", "SHOW", "SHOW", 
                                      "StructureBoundary true;StructureLine true;ElectricDistributionLine true", 
                                      "StructureJunction true;ElectricDistributionAssembly true",
                                      "ElectricDistributionJunctionObject true", 
                                      "ElectricDistributionEdgeObject true")

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics