ArcGIS Pro 2.9 API Reference Guide
AddAssociation Method

ArcGIS.Core.Data.UtilityNetwork Namespace > UtilityNetwork Class : AddAssociation Method
The specified association.
Adds an association between two rows. This method must be called on the MCT. Use QueuedTask.Run.
Syntax
public void AddAssociation( 
   Association association
)
Public Sub AddAssociation( _
   ByVal association As Association _
) 

Parameters

association
The specified association.
Exceptions
ExceptionDescription
association is null.

If this instance of utility network has a UtilityNetworkDefinition.GetSchemaVersion less than 4 and the Association.Type of association is AssociationType.JunctionEdgeObjectConnectivityFromSide, AssociationType.JunctionEdgeObjectConnectivityMidspan or AssociationType.JunctionEdgeObjectConnectivityToSide.

-or-

If the Association.Type of association is AssociationType.JunctionJunctionConnectivity, AssociationType.JunctionEdgeObjectConnectivityFromSide, AssociationType.JunctionEdgeObjectConnectivityMidspan or AssociationType.JunctionEdgeObjectConnectivityToSide and the Terminal in Association.FromElement is null and the associated TerminalConfiguration has multiple terminals.

-or-

If the Association.Type of association is AssociationType.JunctionJunctionConnectivity and the Terminal in Association.ToElement is null and the associated TerminalConfiguration has multiple terminals.

This method or property must be called within the lambda passed to QueuedTask.Run
Requirements

Target Platforms: Windows 11, Windows 10, Windows 8.1

See Also

Reference

UtilityNetwork Class
UtilityNetwork Members