Show / Hide Table of Contents

Method CanAddAssociationAsync

CanAddAssociationAsync(UtilityAssociation)

Checks if the utility association can be added to the utility network.

Declaration
public Task<bool> CanAddAssociationAsync(UtilityAssociation association)
Parameters
Type Name Description
UtilityAssociation association

The association to be checked.

Returns
Type Description
Task<bool>

true if the association can be added to the utility network, false otherwise.

Remarks

Checks that all of the following conditions are met:

  • the utility network is in a valid state and supports the association type.
  • the specified association only includes elements that are accessible and that have the necessary association role and terminal selection.
  • a utility rule exists that permits their association.
  • the current user has the necessary permissions.
Exceptions
Type Condition
InvalidOperationException

The utility network schema version does not support the association type.

GeodatabaseClosedException

This method is called after the geodatabase is closed.

ArgumentException

The specified association includes an element that is not accessible or does not belong in this utility network. -OR- The specified association has a FromElement that lacks the necessary role for the association type. -OR- The specified association type is connectivity and includes an element without a terminal or its default terminal could not be determined. -OR- The specified association is not supported by any utility rule.

See Also
CanAddAssociationAsync(UtilityAssociationType, UtilityElement, UtilityElement)
CanDeleteAssociations()

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.5 - 200.8
.NET200.5 - 300.0
.NET Windows200.5 - 300.0
.NET Android200.5 - 300.0
.NET iOS200.5 - 300.0
.NET Framework200.5 - 200.8
UWP200.5 - 200.8

CanAddAssociationAsync(UtilityAssociationType, UtilityElement, UtilityElement)

Checks if a utility association with the specified type between the specified utility elements can be added to the utility network.

Declaration
public Task<bool> CanAddAssociationAsync(UtilityAssociationType associationType, UtilityElement fromElement, UtilityElement toElement)
Parameters
Type Name Description
UtilityAssociationType associationType

The type of association between the FromElement and ToElement.

UtilityElement fromElement

The first participant in the association.

UtilityElement toElement

The second participant in the association.

Returns
Type Description
Task<bool>

true if the association can be added to the utility network, false otherwise.

Remarks

Checks that all of the following conditions are met:

  • the utility network is in a valid state and supports the association type.
  • the specified association only includes elements that are accessible and that have the necessary association role and terminal selection.
  • a utility rule exists that permits their association.
  • the current user has the necessary permissions.
See Also
CanAddAssociationAsync(UtilityAssociation)
CanDeleteAssociations()

Applies to

Platforms and versions
TargetVersions
.NET Standard 2.0200.5 - 200.8
.NET200.5 - 300.0
.NET Windows200.5 - 300.0
.NET Android200.5 - 300.0
.NET iOS200.5 - 300.0
.NET Framework200.5 - 200.8
UWP200.5 - 200.8
In this article
Provide feedback
Back to top Copyright © 2025 Esri.