Summary
Deletes a diagram template and all diagrams based on that 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 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 Input Network parameter value must be from a database connection established as the database utility network owner or database trace network owner.
- The connected ArcGIS Enterprise portal account must be the portal utility network owner or portal trace network owner.
- This tool must be connected to the default version, which is expected to be public and not protected.
Deleting a diagram template deletes all diagrams, and their content, based on that template from the database.
Syntax
arcpy.nd.DeleteDiagramTemplate(in_utility_network, template_name)
Parameter | Explanation | Data Type |
in_utility_network | The utility network or trace network related to the diagram template to delete. | Utility Network; Trace Network |
template_name | The name of the diagram template to delete. | String |
Derived Output
Name | Explanation | Data Type |
out_utility_network | The updated utility network or trace network. | Utility Network; Trace Network |
Code sample
Delete the MyTemplate1 template existing for a given network.
import arcpy
input_Network = "D:/MyProjectLocation/MyDatabaseConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
input_DiagramTemplate = "MyTemplate1"
arcpy.DeleteDiagramTemplate_nd(input_Network, input_DiagramTemplate)
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes