This document is archived and information here might be outdated. Recommended version. |
ArcObjects Help for .NET developers > ESRI.ArcGIS.Snippets > Snippets > Set M Value on Point Snippet (ArcObjects .NET 10.4 SDK) |
Set a point's MAware to true and assign it a M value.
///<summary>Set a point's MAware to true and assign it a M value.</summary> /// ///<param name="point">An IPoint interface that is the point to enable M values.</param> ///<param name="mValue">A System.Double that is the points M value in map units.</param> /// ///<remarks></remarks> public void SetMValueOnPoint(ESRI.ArcGIS.Geometry.IPoint point, System.Double mValue) { ESRI.ArcGIS.Geometry.IMAware mAware=point as ESRI.ArcGIS.Geometry.IMAware; // Dynamic Cast mAware.MAware=true; point.M=mValue; }
'''<summary>Set a point's MAware to true and assign it a M value.</summary> ''' '''<param name="point">An IPoint interface that is the point to enable M values.</param> '''<param name="mValue">A System.Double that is the points M value in map units.</param> ''' '''<remarks></remarks> Public Sub SetMValueOnPoint(ByVal point As ESRI.ArcGIS.Geometry.IPoint, ByVal mValue As System.Double) Dim mAware As ESRI.ArcGIS.Geometry.IMAware=TryCast(point, ESRI.ArcGIS.Geometry.IMAware) ' Dynamic Cast mAware.MAware=True point.M=mValue End Sub