This document is archived and information here might be outdated. Recommended version. |
Indicates if the edit sketch geometry will contain Ms.
[Visual Basic .NET]
Public Property MAware As Boolean
[C#]
public bool MAware {get; set;}
If the EditSketch geometry contains measures (Ms), the MAware property will return a boolean value of True.
To view the m values for the edit sketch right click over a sketch segment and display the properties dialog. If the sketch is MAware, an additional column will appear to the right showing the m values.
If the edit sketch is m-aware, all newly inserted vertices will have a value of NaN. Inserting an m-aware sketch into a feature that is not m-aware will return an error.
The following example demonstrates how you can make the EditSketch MAware in C#.
public void EditSketch2()
{
UID editorUid = new UIDClass();
editorUid.Value = "esriEditor.Editor";
//You can get app from ICommand :: OnCreate() hook parameter
IEditSketch2 editSketch = app.FindExtensionByCLSID(editorUid) as IEditSketch2;
if (!editSketch.MAware)
editSketch.MAware = true;
}
The following example demonstrates how you can make the EditSketch MAware in VBNet.
Public Sub EditSketch2()
'You can get app from ICommand :: OnCreate() hook parameter
Dim editorUid As UID = New UIDClass()
editorUid.Value = "esriEditor.Editor"
Dim editSketch As IEditSketch2 = TryCast(app.FindExtensionByCLSID(editorUid), IEditSketch2)
If Not editSketch.MAware Then
editSketch.MAware = True
End If
End Sub