Method AddAssociationAsync
AddAssociationAsync(UtilityAssociation)
Adds an association between two utility elements in this utility network.
Declaration
public Task AddAssociationAsync(UtilityAssociation association)
Parameters
Type | Name | Description |
---|---|---|
Utility |
association | The association to add. |
Returns
Type | Description |
---|---|
System. |
A System.
One of the following exceptions may be set on the returned System.
|
Remarks
Adding an association may also update the features that participate in the association.
Use Can
This method requires that:
- The association type is supported by the utility network schema.
Note that Schema
Version less than 4 does not support the following association types: - The association elements are accessible.
Use Is
Valid to check feature accessibility to ensure it has not been filtered out. - The From
Element has the necessary role for the association type. A Container can participate in a containment association or a Structure can participate in a structural attachment association. - If the association's type is Connectivity, the Terminal must be set for elements with more than one terminal available in the Terminals
- The association is supported by a utility rule.
Use GetRulesAsync(IEnumerable<UtilityAssetType>, CancellationToken) to determine if the
Association
Type can be made between the FromElement and ToElement using their corresponding AssetType .
See Also
Applies to
Platforms and versions
Target | Versions |
---|---|
.NET Standard 2.0 | 200.5 - 200.6 |
.NET | 200.5 - 200.6 |
.NET Windows | 200.5 - 200.6 |
.NET Android | 200.5 - 200.6 |
.NET iOS | 200.5 - 200.6 |
.NET Framework | 200.5 - 200.6 |
UWP | 200.5 - 200.6 |