This document is archived and information here might be outdated.  Recommended version.


ISpatialReferenceTolerance.SetDefaultMTolerance Method (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Geometry)  

ISpatialReferenceTolerance.SetDefaultMTolerance Method

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
);

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.

Remarks

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.

[C#]

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();

See Also

ISpatialReferenceTolerance Interface

.NET Samples

Creating a toolbar of globe tools (Code Files: SpatialReference)