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


IMCollection.OffsetMs Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Geometry)  

IMCollection.OffsetMs Method

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

Product Availability

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

Remarks

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.

[C#]

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

See Also

IMCollection Interface