This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ArcObjects namespaces > Geometry > ESRI.ArcGIS.Geometry > Interfaces > IM > IMCollection Interface > IMCollection.OffsetMs Method (ArcObjects .NET 10.5 SDK) |
Offsets all the M values by an offset value.
[Visual Basic .NET] Public Sub OffsetMs ( _ ByVal Offset As Double _ )
[C#] public void OffsetMs ( double Offset );
[C++]
HRESULT OffsetMs(
double Offset
);
[C++]
Parameters Offset Offset is a parameter of type double
The OffsetMs method will update all the measure attributes for a PolyLine, and should only be used if every measure has been set (i.e. there are no NaNs). Check the IMAware::MSimple property or use the IMSegmentation methods to fill in any missing measure values. OffsetMs is analgous to moving spatial coordinates.
public IPolyline OffsetMs(IPolyline polyline, double offset)
{
//Offset (add) the M values on a PolyLine by a factor
IMAware mAware=polyline as IMAware;
IMCollection mCollection=mAware as IMCollection;
if (mAware.MAware)
{
mCollection.OffsetMs(offset);
return mCollection as IPolyline;
}
else
{
return null;
}
}