Share diagram templates

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:

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 or trace network in an enterprise geodatabase, these tasks must be run by the database network owner; that is, the database utility network owner or the database trace network owner through a database connection to the default version. In addition, the connected ArcGIS Enterprise portal account must be the portal network owner; that is, the portal utility network owner or the portal trace 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

  1. Start ArcGIS Pro and load the diagram template geoprocessing models you want to share.
  2. Create a toolbox.
  3. Save all the geoprocessing models you want to share in this new toolbox.
  4. Close ArcGIS Pro.

Run diagram template geoprocessing models to add templates on another network

  1. Open the ArcGIS Pro project referencing the network for which you want to create similar diagram templates.
  2. Add the toolbox referencing the diagram template models you want to run.
  3. Edit the template geoprocessing model in ModelBuilder.
  4. Such a model usually starts with the Add Diagram Template tool:
    1. Double-click the Add Diagram Template box.
    2. Click the Browse button next to Input Network to select and browse the network under which you want to create the template.
    3. Optionally, change the template name currently specified in the Diagram Template Name box.
  5. 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.

  6. 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:

  1. Open the Geoprocessing pane, click Toolboxes, and expand the Network Diagram Tools toolbox.
  2. Expand the Configuration toolset and click Export Diagram Template Definitions.
  3. Set up the Export Diagram Template Definitions tool as follows:
    1. Click the Browse button next to the Input Network box, go to Project > Databases, select your database connection, and browse to the network.
    2. Select the template for which you want to export the definitions from the Input Diagram Template drop-down list.
    3. 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.
    4. 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.
  4. 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:

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:

  1. Open the Geoprocessing pane, click Toolboxes, and expand the Network Diagram Tools toolbox.
  2. Expand the Configuration toolset and click Import Diagram Template Definitions.
  3. Set up the Import Diagram Template Definitions tool as follows:
    1. Click the Browse button next to the Input Network box, go to Project > Databases, select your database connection, and browse to the network.
    2. Select the template for which you want to import diagram template definitions from the Input Diagram Template drop-down list.
    3. 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.
    4. 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).
  4. 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:

  1. Open the Geoprocessing pane, click Toolboxes, and expand the Network Diagram Tools toolbox.
  2. Expand the Configuration toolset and click Add Diagram Template.
  3. Set up the Add Diagram Template tool as follows:
    1. Click the Browse button next to the Input Network box, go to Project > Databases, select your database connection, and browse to the network.
    2. Type a name for your new template in the Input Diagram Template text box.
    3. 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).
    4. 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).
  4. Click Run.

Related topics