canAddAssociation

Checks if the utility association can be added to the utility network. 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.

Return

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

Since

200.5.0

Parameters

association

The association to be checked.

See also

(UtilityAssociationType, UtilityElement, UtilityElement)


suspend fun canAddAssociation(associationType: UtilityAssociationType, fromElement: UtilityElement, toElement: UtilityElement): Result<Boolean>

Checks if a utility association with the specified type between the specified utility elements can be added to the utility network. 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.

Return

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

Since

200.5.0

Parameters

associationType

The type of association between the UtilityAssociation.fromElement and UtilityAssociation.toElement.

fromElement

The first participant in the association.

toElement

The second participant in the association.

See also