To refine the diagram layer definition currently set on a template—for example, to customize settings for some layers such as System Junctions, Reduction Edges, and so on, or to add labels—you start your work in ArcGIS Pro from a diagram layer based on your template. Then you edit the layers under the network diagram layer and set up any labels before exporting the diagram layer definition using the Export Diagram Layer Definition tool. This tool creates an output network diagram layer definition file (.ndld). With this complete, run the Import Diagram Template Definitions tool with the output .ndld file specified for the Diagram Layer Definition File parameter.
Requirements and prerequisites
The requirements and prerequisites to refine a diagram layer definition on a template are as follows:
- This operation must be executed from either a utility network or trace network in a file geodatabase or a database connection to the utility network in an enterprise geodatabase. When working with a utility network in an enterprise geodatabase, you can't work from a service.
- For the case of a database connection to the utility network in an enterprise geodatabase, you must connect using the credentials of the database utility network owner.
- When working with a database connection to the utility network in an enterprise geodatabase, you must sign in to your ArcGIS Enterprise portal using the credentials of the portal utility network owner.
The next sections detail the four steps in the workflow to refine the diagram layer definition set up on a template:
Create a map referencing the utility network or trace network data element
- Start ArcGIS Pro.
- When working with a utility network in an enterprise geodatabase, sign in to your ArcGIS Enterprise portal using the credentials of the portal utility network owner.
- Load your project or create one.
- Depending on the geodatabase you want to work with, do one of the following:
- When working with a utility network or trace network in a file geodatabase, add the file geodatabase to the project.
- When working with a utility network in an enterprise geodatabase, add the database connection file to the project or create a new one.
Caution:
Make sure the utility network is registered as branch versioned and you are connecting using the credentials of the database utility network owner.
- Activate a map that references the utility network or trace network through the database connection file or file geodatabase, or create a map as follows:
- In the Catalog pane, on the Project tab, under Databases, expand your geodatabase item.
- Right-click the utility network or trace network data element and click Add To A New Map.
- Click Yes if you are prompted to add all source classes that participate in the network to the map.
Generate a diagram and edit the layers under the network diagram layer
To edit layers under a network diagram layer based on your template, complete the following steps:
- On the Utility Network or Trace Network tab, click the Network Options dialog box launcher located at the bottom right of the Diagram group.
- Under the General section, check Open diagrams with all diagram template sublayers so the All Layers mode is turned on for each network diagram layer at its loading by default.
- Select relevant network features or network objects in the active map.
- Select the network layer in the Contents pane, and on the Data tab of the utility network or trace network tab set, click the New Diagram drop-down arrow and click the template you want to refine the diagram layer definition.
A diagram map opens with a newly generated diagram.
- On the Manage group on the Network Diagram tab, ensure that All Layers is enabled.
Caution:
Without this mode enabled, you will be stopped in the next section since it is a prerequisite to the Export Diagram Layer Definition tool execution. Moreover, you will have to restart all the edits done on your layer or subtype group layer during the next step.
- In the Contents pane, consider each layer or subtype group layer under the network diagram layer and optionally do the following:
- Remove any layer or subtype group layer that has no relevance to the diagram template.
- Right-click a subtype group layer, click Properties, and click the Subtype tab to manage the subtype layer. For example, remove irrelevant subtypes , change the subtype order, and so on. Then close the Layer Properties dialog box.
- Change the name of the retained layers, subtype group layers, or subtype layers.
- Set appearance options for each layer or subtype layer.
- Set labeling options for the layers and subtype layers.
- Define the visibility range of the layers and subtype layers.
Note:
Removing layers, subtype group layers, and subtype layers that are not relevant to the diagram template will improve display performance.
Export the diagram layer definition from the network diagram layer
To export the diagram layer definition currently set for the network diagram layer you edited, run the Export Diagram Layer Definition geoprocessing tool, as explained in the following steps:
- On the Analysis tab, click Tools.
- In the Search text box, type export diagram, and select the Export Diagram Layer Definition tool.
- In the Geoprocessing pane, from the Input Network Diagram Layer drop-down list, select the diagram layer referenced in the active diagram map (the one with the layer properties you modified in the section above). It's listed as Temporary Diagram.
- Specify the Output File. In other words, browse to and select a folder location, type a name for the network diagram layer file to create—NewDiagramLayerDefinition, for example—and click Save.
- Click Run.
A diagram layer definition file (.ndld) is created at the specified output location.
Import the network diagram layer definition to the template
To import a network diagram layer definition to a template, run the Import Diagram Template Definitions tool, as described in the following steps.
Caution:
Although you can import a layer definition that has been exported from another network template, the network source and destination templates must have the following in common:
- The same network type
- The same domain
- The same data model
- The same asset type and asset group values
Whether or not the source and destination templates share the same network, you must also consider the rule and layout definitions of these templates. Some diagram layers that are needed for the destination template may be missing from the source template. This typically occurs when a Remove Feature or Reduce Junction rule is configured to systematically discard all network elements coming from a given network source class or object table on the source template. In this case, the layer under the network diagram layer that is related to those removed or reduced network elements may have been intentionally removed from the network diagram layer definition's source template, since it has no bearing on that template. However, such a layer is necessary for the destination template when there is no rule configured to remove or reduce those elements.
- On the Analysis tab, click Tools.
- In the Search text box, type import diagram, and select the Import Diagram Template Definitions tool.
- Click the Browse button next to the Input Network box, go to Project\Databases, select your geodatabase item, and browse to the utility network or trace network.
- In the Input Diagram Template drop-down list, select the template to which you want to import the network diagram layer definition.
- Click the Browse button next to the Diagram Layer Definition File box, and browse to and select the network diagram layer definition file (.ndld) generated from the Export Diagram Layer Definition tool.
- Click Run.
Caution:
When consuming the network through a service, an additional step is required to get the modified diagram template fully operational on the network service: you must connect to your ArcGIS Server and then stop and restart this service.