Skip To Content

Set Association Role

Summary

Alters the role assigned to a class at the asset type level.

Roles define how an asset type participates in a utility network. To learn more about association roles, see Set or modify an association role assignment.

Usage

  • The view scale and deletion semantics for an asset type's role can be defined or updated with this tool.

  • Some network configuration tasks can only be performed prior to the network topology being enabled for the first time. Review Network topology actions for tasks specific to this tool and the required network topology state.

  • The network topology must be disabled.

  • The connected ArcGIS Enterprise portal account must be the portal utility network owner.

  • This tool should be executed when connected to the default version.

Syntax

SetAssociationRole(in_utility_network, domain_network, featureclass, assetgroup, assettype, association_role_type, association_deletion_semantics, {view_scale}, {split_content})
ParameterExplanationData Type
in_utility_network

The utility network that contains the asset type with an association role to set.

Utility Network; Utility Network Layer
domain_network

The domain network that contains the asset type with an association role to set.

String
featureclass

The utility network assembly or structural feature class that contains the asset type with an association role to set.

String
assetgroup

The asset group that contains the asset type.

String
assettype

The asset type with the association role to set.

String
association_role_type

The type of association role to assign to the asset type.

  • CONTAINERFeatures of this asset type can contain other features as contents.
  • STRUCTUREFeatures of this asset type can have other features attached to them.
  • NONENo role type. These are features that are neither a container nor a structure but do connect to other structures.
String
association_deletion_semantics

The deletion semantics for the features.

  • CASCADEAll content is deleted when the parent container is deleted. Content features are permanently deleted.
  • SET_TO_NONEAll containment associations are removed. Content features are now regular features in the map.
  • RESTRICTEDUpon deletion, if content exists in the container, an error is returned. You must then either delete the content features or remove them from the container by deleting the association (placing them outside the container).
String
view_scale
(Optional)

The scale at which to enter containment mode to edit features participating in the container. For example, setting the view scale to 5 means that when you enter containment mode of the container feature, the scale will be 1:5. Units are based on the utility network units, which are located on the Source tab of the utility network layer properties pane.

Double
split_content
(Optional)

Specify what happens to the associated content of a container if the container feature is split. This parameter is only relevant for containers that are line features.

  • SPLITSplit the container's content if the container feature is split. If a parallel content line feature is found, the content is also split and each section will be contained by the closest container feature. If the content line is not parallel, the content will be contained by the container feature that is closest to it.
  • DO_NOT_SPLITDo not split the container's content if the container feature is split. If a parallel content line feature is found, the content will be contained by both sections of the container feature. If the content line is not parallel, the content will be contained by the container feature that is closest to it. This is the default.
Boolean

Derived Output

NameExplanationData Type
out_utility_network

The updated utility network.

Utility Network

Code sample

SetAssociationRole example (Python window)

Set the container association role for the asset type transformer. The view scale has been set to 10, and the deletion semantics are restricted.

import arcpy
arcpy.SetAssociationRole_un("Utility Network", "ElectricDistribution", 
                            "ElectricDistributionAssembly", "Transformer Bank", 
                            "Transformer", "CONTAINER", "RESTRICTED", 10)

Environments

This tool does not use any geoprocessing environments.

Licensing information

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

Related topics