Companion

object Companion

Functions

Link copied to clipboard
suspend fun create(utilityNetwork: UtilityNetwork, assetType: UtilityAssetType): Result<SnapRules>

Analyzes an UtilityNetwork for the rules which allow or limit the snapping of the given UtilityAssetType to other features, and returns a SnapRules which can be used to configure interactive snapping behavior in a GeometryEditor. To configure rule-based snapping, use this method to create a SnapRules that you can then pass to SnapSettings.syncSourceSettings. This method is ideal for creating SnapRules when you have a reference to the UtilityAssetType, for example if you have identified an existing feature to be edited, you can call UtilityNetwork.createElement, then get UtilityElement.assetType to pass in.

suspend fun create(utilityNetwork: UtilityNetwork, featureTable: FeatureTable, attributes: Map<String, Any?>): Result<SnapRules>

Analyzes an UtilityNetwork for the rules which allow or limit the snapping of a feature in the given featureTable with the given attributes, and returns a SnapRules which can be used to configure interactive snapping behavior in a GeometryEditor. To configure rule-based snapping, use this method to create a SnapRules that you can then pass to SnapSettings.syncSourceSettings. This method is ideal for creating SnapRules where you have a set of attributes, for example, if you are creating a new feature from a FeatureTemplate or by using a FeatureForm. Connectivity rules involving the UtilityAssetType of the feature are described by those attributes are included in the resulting rules.