Create Geoprocessing Model From Diagram Template (Network Diagram)

Summary

Creates a geoprocessing model with network diagram configuration tools that will set up the rules and layouts on the input diagram template.

Caution:

This tool is a configuration and administration tool.

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 or mobile 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 output geoprocessing model allows you to analyze the settings on a diagram template. To make changes, edit the rule or layout tool settings and run the model to apply the changes.

Parameters

LabelExplanationData Type
Input Network

The utility network or trace network containing the diagram template from which the geoprocessing model will be created.

Utility Network; Trace Network
Template Name

The name of the diagram template for which the sequence of rules and layouts will be created.

String
Target Toolbox

The toolbox in which the geoprocessing model will be created.

Toolbox
Model Name
(Optional)

The name of the geoprocessing model that will be created. By default, the name of the geoprocessing model will be the same as the input diagram template name.

String

Derived Output

LabelExplanationData Type
Updated Toolbox

The updated toolbox.

Toolbox

arcpy.nd.CreateGeoprocessingModelFromDiagramTemplate(in_network, template_name, target_toolbox, {model_name})
NameExplanationData Type
in_network

The utility network or trace network containing the diagram template from which the geoprocessing model will be created.

Utility Network; Trace Network
template_name

The name of the diagram template for which the sequence of rules and layouts will be created.

String
target_toolbox

The toolbox in which the geoprocessing model will be created.

Toolbox
model_name
(Optional)

The name of the geoprocessing model that will be created. By default, the name of the geoprocessing model will be the same as the input diagram template name.

String

Derived Output

NameExplanationData Type
updated_toolbox

The updated toolbox.

Toolbox

Code sample

CreateGeoprocessingModelFromDiagramTemplate example (Python window)

Create a geoprocessing model from the template named MyTemplate1 related to the input network.

import arcpy
arcpy.nd.CreateGeoprocessingModelFromDiagramTemplate(
    in_network=r"D:\MyProjectLocation\MyDatabaseConnection.sde\MyDatabase.MAP.Electric\MyDatabase.MAP.Electric",
    template_name="MyTemplate1",
    target_toolbox=r"D:\MyProjectLocation\ElectricTemplates.tbx",
    model_name="MyTemplate1"
)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics