Summary
Changes ownership of stored network diagrams.
Caution:
This tool is an administration tool.
Legacy:
Change Diagrams Owner cannot process utility network datasets created prior to ArcGIS Pro 2.4, even if they have been upgraded.
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.
Either the Diagram Names or Source Owner parameter must be specified to execute the tool. The tool will fail if neither has been specified.
- When no diagram names have been specified, any network diagram owned by the source owner will be transferred to the specified target owner.
- When Diagram Names and Source Owner are both specified, the source owner is ignored and the ownership of each input network diagram will be transferred to the specified target owner regardless of the current owner.
The specified Source Owner and Target Owner must already be the owner of at least one stored network diagram in the dataset.
Diagram names specified in the Diagram Names parameter are not case sensitive.
When a network diagram layer is specified as input, it is only used to retrieve the related network; it doesn't impact the network diagram. The only exception is if the diagram name is referenced among the specified diagram names.
Syntax
arcpy.nd.ChangeDiagramsOwner(in_diagrams, target_owner, {source_owner}, {diagram_names})
Parameter | Explanation | Data Type |
in_diagrams | The input network layer or network diagram layer related to the utility network or trace network of interest with the stored network diagrams whose ownership will be transferred. | Utility Network Layer; Trace Network Layer; Utility Network; Trace Network; Diagram Layer |
target_owner | The name of the user that will become the new owner of the specified diagrams. | String |
source_owner (Optional) | The name of the user whose ownership of the network diagrams will be changed. Note:This parameter is only used when there are no specified diagram names. When diagram names are specified, it will be ignored. | String |
diagram_names [diagram_names,...] (Optional) | The names of the diagrams to be processed. | String |
Derived Output
Name | Explanation | Data Type |
out_diagrams | The updated network or network diagram. | Utility Network Layer; Trace Network Layer; Utility Network; Trace Network; Diagram Layer |
Code sample
Transfer all diagrams owned by userA to userB.
import arcpy
source_Network = "D:/MyProjectLocation/MyDatabaseSourceConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
arcpy.ChangeDiagramsOwner_nd(source_Network, "userB", "userA")
Transfer ownership of a set of network diagrams to userB.
import arcpy
source_Network = "D:/MyProjectLocation/MyDatabaseSourceConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
arcpy.ChangeDiagramsOwner_nd(
source_Network, "userB", "",
["Diagram78951", "Diagram78952", "Diagram78967", "Diagram25789"])
Environments
Licensing information
- Basic: No
- Standard: Yes
- Advanced: Yes