Summary
Alters properties for a stored network diagram.
Caution:
If the diagram is related to a utility network or trace network in an enterprise geodatabase, only the diagram owner and the portal utility network owner or the portal trace network owner can use the Alter Diagram Properties tool to change the access right level of the input diagram.
Usage
This tool is not supported when working with a database connection to a utility network or trace network in an enterprise geodatabase. You must use either the related published utility network or trace network service, or a utility network or trace network in a file geodatabase.
The input network diagram layer must be from either a utility network or a trace network in a file geodatabase or a network diagram service.
The tool alters diagram properties that have been initialized on your stored diagrams. With this tool, you can do the following:
- Rename the diagram.
- Modify its access right level.
- Edit the diagram tags.
Syntax
arcpy.nd.AlterDiagramProperties(in_network_diagram_layer, out_name, {access_right_type}, {tags})
Parameter | Explanation | Data Type |
in_network_diagram_layer | The stored network diagram to alter. | Diagram Layer |
out_name | The new name for the input network diagram. | String |
access_right_type (Optional) | Specifies the access right level of the input diagram.
| String |
tags (Optional) | One or several tags that will help find the stored diagram. These tags can be used in the Find Diagrams pane. To add several tags, use the number sign (#) to separate each tag. This also allows a more thorough and efficient diagram search. | String |
Derived Output
Name | Explanation | Data Type |
out_network_diagram_layer | The updated network diagram. | Diagram Layer |
Code sample
The following stand-alone script uses the AlterDiagramProperties tool to retrieve a stored network diagram in the database and change its properties.
# Name: AlterDiagramProperties.py
# Description: Retrieve a stored diagram and change its properties.
# Import system modules
import arcpy
# Initialize variables
input_network = "https://cezembre.esri.com/server/rest/services/Naperville_ORA/FeatureServer/8"
input_DiagramName = "Test"
# Set overwrite option
arcpy.env.overwriteOutput = True
# Retrieving a given stored diagram and transforming it as a diagram layer
arcpy.MakeDiagramLayer_nd(input_network, input_DiagramName, "built_diagramlayer")
# Renaming this diagram to "SmartTree1_Test", changing its access right
# level, and specifying tags
arcpy.AlterDiagramProperties_nd("built_diagramlayer", "SmartTree1_Test",
"PROTECTED",
"Distribution#RMT0003#Naperville North East")
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes