addAssociation

suspend fun addAssociation(association: UtilityAssociation): Result<Unit>

Adds an association between two utility elements in this utility network. Adding an association may also update the features that participate in the association.

Use UtilityNetwork.canAddAssociation to determine if you can successfully add this association.

This method requires that:

Return

A Result that has no return value. One of the following error codes may be set on the returned Result: * ErrorType.CommonInvalidCall, if this method is called on a utility network schema version that does not support the association type. * ErrorType.GeodatabaseDatabaseClosed, if this method is called after the geodatabase is closed. * ErrorType.CommonInvalidArgument, when the specified association: * includes an element that is not accessible or does not belong in this utility network. * has an UtilityAssociation.fromElement that lacks the necessary role for the association type. * type is connectivity and includes an element without a terminal or its default terminal could not be determined. * is not supported by any utility rule.

Since

200.5.0

Parameters

association

The association to add.

See also