Show / Hide Table of Contents

Enum SnapRuleBehavior

Describes whether snap rules are used for a ISnapSource and, if so, whether they will allow any snapping.

Namespace: Esri.ArcGISRuntime.UI.Editing
Assembly: Esri.ArcGISRuntime.dll
Syntax
public enum SnapRuleBehavior
Remarks

When rule-based snapping is configured on a GeometryEditor, each RuleBehavior indicates the snapping behavior for the snap source, based on the SnapRules that were passed to SyncSourceSettings(SnapRules, SnapSourceEnablingBehavior). For more information about configuring a GeometryEditor to use rule-based snapping, see SnapRules.

Each SnapSourceSettings can be enabled or disabled independently of its RuleBehavior - see IsEnabled for a summary of the other configuration options that can affect interactive snapping.

When snapping is configured without rule-based snapping (by calling SyncSourceSettings()), all RuleBehavior values will be None.

See also: Geometric coincident-based connectivity ArcGIS Pro help topic

Fields

Name Description
None

There are no applicable snap rules for this ISnapSource; snapping behavior is determined by IsEnabled.

This value is used in the following situations:

  • There are no utility network connectivity rules relating to this combination of ISnapSource and the UtilityAssetType being edited by the GeometryEditor because the snap source related to the operational layer is not based on a UtilityNetworkSource.
  • Snap sources have been synchronized without SnapRules by calling SyncSourceSettings().

You can set IsEnabled to true for these snap sources if snapping is nevertheless appropriate for your specific scenario, or delegate the choice to the end user in your UI. When enabled (IsEnabled is true), the user can interactively snap to geometry edges (segments) and vertices of any feature in the snap source.

When syncing with SetFromRules, any new SnapSourceSettings objects added to the SourceSettings collection that have None will have the default IsEnabled value. Any SnapSourceSettings objects that already exist in the collection, due to previous synchronize calls, will be unaffected.

By default, the geometry being edited will be able to snap to any feature in this ISnapSource.

RulesLimitSnapping

This value is returned from RuleBehavior when CreateAsync(UtilityNetwork, UtilityAssetType) or SnapRules determined that the given asset type can be geometrically coincident with certain features in the applicable snap source.

These rules limit the snapping in applicable ways, based on the logical connectivity of the items. They may be snapped to based on attributes. For example, rules may be defined that prevent snapping a metal water pipe to a plastic water pipe junction if these components are physically incompatible, but allow snapping to a compatible metal pipe junction.

Rules may also limit which parts of the snap source geometries can be snapped to, based on a connectivity policy (UtilityConnectivityPolicy). For example a connectivity rule may require that a fuse asset is only connected to a power line asset at one of its end points (the first or last vertex in the line), and therefore snapping at endpoints will be allowed, but snapping to the power line midspan (along a segment) will be prevented.

Visual snapping cues will guide the user to only the appropriate types of connectivity.

These snap sources will always be based on data from the UtilityNetwork used to create the SnapRules.

RulesPreventSnapping

Rules specify that the asset type being edited should not snap to any features in the snap source.

This value is returned from RuleBehavior when CreateAsync(UtilityNetwork, UtilityAssetType) determined that the given asset type should not be geometrically coincident with features in the applicable snap source. In this case, interactive snaps to features in the snap source are prevented because the utility network data model indicates this is not a logical connection and the features should not be geometrically coincident. For example an electric fuse device feature cannot be coincident with another electric fuse device, as two devices cannot be in the same physical location, and snapping is prevented in this case.

If providing the ability for a user to enable or disable snap sources in your app you may wish to exclude these snap sources from any list to simplify the user experience, because the sources cannot actually be snapped to regardless of the value of IsEnabled.

These snap sources will always be based on data from the UtilityNetwork used to create the SnapRules.

See also: Coincident features ArcGIS Pro help topic

See Also
ISnapSource

Applies to

TargetVersions
.NET Standard 2.0200.7 - 200.8
.NET200.7 - 200.8
.NET Windows200.7 - 200.8
.NET Android200.7 - 200.8
.NET iOS200.7 - 200.8
.NET Framework200.7 - 200.8
UWP200.7 - 200.8
In This Article
Back to top Copyright © 2022 Esri.