public static void SetOptions( Map map, SnappingOptions options )
Public Shared Sub SetOptions( _ ByVal map As Map, _ ByVal options As SnappingOptions _ )
Parameters
- map
- options
- a SnappingOptions object that was obtained using GetOptions
public static void SetOptions( Map map, SnappingOptions options )
Public Shared Sub SetOptions( _ ByVal map As Map, _ ByVal options As SnappingOptions _ )
Exception | Description |
---|---|
System.ArgumentNullException | if either of options or map is null |
System.ArgumentOutOfRangeException | if the XYTolerance or ZTolerance is negative, NaN or infinite |
ArcGIS.Core.CalledOnWrongThreadException | This method or property must be called within the lambda passed to QueuedTask.Run. |
//Set snapping options via get/set options var snapOptions = ArcGIS.Desktop.Mapping.Snapping.GetOptions(myMap); //At 2.x - snapOptions.SnapToSketchEnabled = true; snapOptions.IsSnapToSketchEnabled = true; snapOptions.XYTolerance = 100; //At 2.x - snapOptions.ZToleranceEnabled = true; snapOptions.IsZToleranceEnabled = true; snapOptions.ZTolerance = 0.6; //turn on snap tip display parts snapOptions.SnapTipDisplayParts = (int)SnapTipDisplayPart.SnapTipDisplayLayer + (int)SnapTipDisplayPart.SnapTipDisplayType; //turn off all snaptips //snapOptions.SnapTipDisplayParts = (int)SnapTipDisplayPart.SnapTipDisplayNone; //turn on layer display only //snapOptions.SnapTipDisplayParts = (int)SnapTipDisplayPart.SnapTipDisplayLayer; //At 2.x - snapOptions.GeometricFeedbackColor = ColorFactory.Instance.RedRGB; snapOptions.SnapTipColor = ColorFactory.Instance.RedRGB; ArcGIS.Desktop.Mapping.Snapping.SetOptions(myMap, snapOptions);
Target Platforms: Windows 11, Windows 10