ArcGIS Pro 3.2 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / SnappingOptions Class / IsZToleranceEnabled Property
Example

In This Topic
    IsZToleranceEnabled Property
    In This Topic
    Gets or sets the ability to use a ZTolerance.
    Syntax
    public bool IsZToleranceEnabled {get; set;}
    Public Property IsZToleranceEnabled As Boolean
    Remarks
    When enabled, the ZTolerance value is used to evaluate Z snapping. When disabled, the ZTolerance is considered to be infinite. The value is considered to be false (disabled) in 3D views.
    Example
    Snap Options
    //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);
    
    Requirements

    Target Platforms: Windows 11, Windows 10

    ArcGIS Pro version: 3 or higher.
    See Also