Skip To Content

Change Diagrams Owner

Summary

Changes ownership of stored network diagrams.

Caution:

This tool is an administration tool that must be run by the database utility network owner through a direct database connection to the default version. Moreover, default must be public; that is, not protected.

In addition to that requirement, the connected portal account must be the portal utility network owner to perform this operation.

Legacy:

Change Diagrams Owner cannot process utility network datasets created prior to ArcGIS Pro 2.4, even if they have been upgraded.

Learn more about transferring ownership of network diagrams

Usage

  • 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 utility network; it doesn't impact the network diagram. The only exception is if the diagram name is referenced among the specified diagram names.

  • This operation is not supported when using a utility network service. It only works from a direct database connection established as the database owner.

Syntax

ChangeDiagramsOwner(in_diagrams, target_owner, {source_owner}, {diagram_names})
ParameterExplanationData Type
in_diagrams

The input utility network layer or the input network diagram layer related to the utility network of interest with stored network diagrams whose ownership will be transferred.

Utility Network Layer; Utility 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

NameExplanationData Type
out_diagrams

The updated utility network or network diagram.

Utility Network; Utility Network Layer; Network Diagram Layer

Code sample

ChangeDiagramsOwner example 1 (Python window)

Transfer all diagrams owned by userA to userB.

import arcpy
source_UtilityNetwork = "D:/MyProjectLocation/MyDatabaseSourceConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
arcpy.ChangeDiagramsOwner_un(source_UtilityNetwork, "userB", "userA")
ChangeDiagramsOwner example 2 (Python window)

Transfer ownership of a set of network diagrams to userB.

import arcpy
source_UtilityNetwork = "D:/MyProjectLocation/MyDatabaseSourceConnection.sde/MyDatabase.MAP.Electric/MyDatabase.MAP.Electric"
arcpy.ChangeDiagramsOwner_un(
    source_UtilityNetwork, "userB", "", 
    ["Diagram78951", "Diagram78952", "Diagram78967", "Diagram25789"])

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics