Diagram rule, layout, and layer definitions can be shared between copies of the same utility network or trace network. To share these definitions, execute one of the following workflows:
- Workflow 1—Create a diagram template by running a geoprocessing model built to create another template.
- Workflow 2—Create a diagram template based on the same definitions of an existing template:
- Export definitions from an existing diagram template to two files: an .ndbd file for the rule and layout definitions and an .ndld file for the diagram layer definition.
- Then, create a diagram template from these two definition files.
- Workflow 3—Import definitions from one template to another:
- Export definitions from an existing diagram template to two files: an .ndbd file for the rule and layout definitions and an .ndld file for the network diagram layer definition.
- Then, import these two definition files into an existing diagram template.
Each of the workflow steps above is detailed in the sections below.
Note:
Creating diagram templates, importing the rule and layout definitions, and diagram layer definition on templates are administration and configuration tasks.
When working with a utility network in an enterprise geodatabase, these tasks must be run by the database utility network owner through a database connection to the default version. In addition, the connected ArcGIS Enterprise portal account must be the portal utility network owner. This essentially forms two-factor authentication.
Note:
In some situations, you can share rule and layout definitions between networks. This is possible when each network is based on the same domain network and network type. For sharing to work, either the diagram rules must be executed independently of any attributes, or the required attributes must exist with the same name, values, and coded domain values in both networks.
Create a diagram template by running the geoprocessing model built to create another template
As explained in the Use geoprocessing models to manage diagram template rule and layout definitions topic, it is strongly recommend that you use ModelBuilder to create your diagram template geoprocessing models so you have better control over the template definitions. This geoprocessing model allows you to share between your projects or with other users.
Save the diagram template geoprocessing models you want to share in a specific toolbox
- Start ArcGIS Pro and load the diagram template geoprocessing models you want to share.
- Create a toolbox.
- Save all the geoprocessing models you want to share in this new toolbox.
- Close ArcGIS Pro.
Run diagram template geoprocessing models to add templates on another network
- Open the ArcGIS Pro project referencing the network for which you want to create similar diagram templates.
- Add the toolbox referencing the diagram template models you want to run.
- Edit the template geoprocessing model in ModelBuilder.
- Such a model usually starts with the Add Diagram Template tool:
- Double-click the Add Diagram Template box.
- Click the Browse button next to Input Network to select and browse the network under which you want to create the template.
- Optionally, change the template name currently specified in the Diagram Template Name box.
- Ensure the other tools that are configured to be chained after the Add Diagram Template tool are ready to execute.
If needed, make any required changes for the tool parameters.
- Click Validate on the ModelBuilder tab, and click Run.
Export definitions from a diagram template
The Export Diagram Template Definitions tool is used to export the diagram rule and layout definitions or the diagram layer definition from a given template. To do so, complete the following steps:
- Open the Geoprocessing pane, click Toolboxes, and expand the Network Diagram Tools toolbox.
- Expand the Configuration toolset and click Export Diagram Template Definitions.
- Set up the Export Diagram Template Definitions tool as follows:
- Click the Browse button next to the Input Network box, go to Project > Databases, select your database connection, and browse to the network.
- Select the template for which you want to export the definitions from the Input Diagram Template drop-down list.
- To export the rule and layout definitions, click the Browse button next to the Output Rule and Layout Definitions File box, browse to and select the file location you want, type a name for the rule and layout definitions file to create, and click Save.
- To export the network diagram layer definition, click the Browse button next to the Output Diagram Layer Definition File box, browse to and select the file location you want, type a name for the network diagram layer definition file to create, and click Save.
- Click Run.
Depending on your settings, the process creates one or two output files at the specified location or locations. Those two files can then be used as the input of two tools:
- Import Diagram Template Definitions—Overwrite diagram template definitions on an existing template.
- Add Diagram Template—Create diagram templates with the same diagram template definitions.
Note:
If Export Diagram Template Definitions is the only tool that allows you to create rule and layout definition files, you can create a network diagram layer definition file (.ndld) when running either the Export Diagram Template Definitions or Export Diagram Layer Definition tools. The Export Diagram Layer Definition tool has been especially designed to create a diagram layer definition file from a network diagram layer for which you will have set up and refined labeling and layer properties on each layer beforehand. This workflow is detailed in the Refine the diagram layer definition on a template topic.
Import rule and layout definitions and a network diagram layer definition into an existing diagram template
The Import Diagram Template Definitions tool is used to import the diagram rule and layout definitions or a network diagram layer definition into a given template:
- Open the Geoprocessing pane, click Toolboxes, and expand the Network Diagram Tools toolbox.
- Expand the Configuration toolset and click Import Diagram Template Definitions.
- Set up the Import Diagram Template Definitions tool as follows:
- Click the Browse button next to the Input Network box, go to Project > Databases, select your database connection, and browse to the network.
- Select the template for which you want to import diagram template definitions from the Input Diagram Template drop-down list.
- To import a rule and layout definitions file, click the Browse button next to the Rule and Layout Definitions File box, and browse to and select any rule and layout definitions file (.ndbd) you created.
- To import a network diagram layer definition file, click the Browse button next to the Diagram Layer Definition File box, and browse to and select any network diagram layer definition file (.ndld) you created (as explained in the Export definitions from a diagram template section above or using the Export Diagram Layer Definition tool).
- Click Run.
The newly imported definitions overwrite those previously set up on the specified template.
Create a diagram template from existing rule and layout definitions and network diagram layer definition files
To create a diagram template from existing rule and layout definitions and diagram layer definition files, run the Add Diagram Template tool:
- Open the Geoprocessing pane, click Toolboxes, and expand the Network Diagram Tools toolbox.
- Expand the Configuration toolset and click Add Diagram Template.
- Set up the Add Diagram Template tool as follows:
- Click the Browse button next to the Input Network box, go to Project > Databases, select your database connection, and browse to the network.
- Type a name for your new template in the Input Diagram Template text box.
- To import a rule and layout definitions file, click the Browse button next to the Rule and Layout Definitions File box, and browse to and select any .ndbd file you created (as explained in the Export definitions from a diagram template section above).
- To import a network diagram layer definition file, click the Browse button next to the Diagram Layer Definition File box, and browse to and select any .ndld file you created (as explained in the Export definitions from a diagram template section above or using the Export Diagram Layer Definition tool).
- Click Run.