This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IS > ISpatialReferenceTolerance Interface > ISpatialReferenceTolerance.SetDefaultMTolerance Method (ArcObjects .NET 10.5 SDK) |
Sets the default tolerance used to determine equality of M values (2.0 * m resolution).
[Visual Basic .NET]
Public Sub SetDefaultMTolerance ( _
)
[C#] public void SetDefaultMTolerance ( );
[C++]
HRESULT SetDefaultMTolerance(
void
);
The SetDefaultMTolerance method establishes the default value for the M tolerance. The default value is 0.001 units.
The minimum allowable MTolerance is 2.0 * MResolution.
If the value specified by SetDefaultMTolerance is not greater than or equal to 2.0 * MResolution, the MTolerance will be set at 2.0 * MResolution.
The following code snippet illustrates the required steps to set the default M tolerance for a new SpatialReference.
ISpatialReferenceFactory3 spatialReferenceFactory =
new SpatialReferenceEnvironmentClass() as ISpatialReferenceFactory3;
ISpatialReference spatialRef=spatialReferenceFactory.CreateSpatialReference(23033);
if (spatialRef == null)
return;
ISpatialReferenceResolution spatialRefResolution=spatialRef as ISpatialReferenceResolution;
// Set the domain extent to a default range based on the target resolution
spatialRefResolution.SetDefaultMResolution();
ISpatialReferenceTolerance spatialRefTolerance=spatialRefResolution as ISpatialReferenceTolerance;
spatialRefTolerance.SetDefaultMTolerance();