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


IEditSketch2.CurrentZ Property (ArcObjects .NET 10.5 SDK)
ArcObjects Library Reference (Editor)  

IEditSketch2.CurrentZ Property

Current Z value for the edit sketch.

[Visual Basic .NET]
Public Property CurrentZ As Double
[C#]
public double CurrentZ {get; set;}

Product Availability

Available with ArcGIS Desktop.

Remarks

The CurrentZ property returns or sets the Z value that is applied to all points added to the sketch.

To view the z values for the edit sketch right click over a sketch segment and display the properties dialog. If the sketch is ZAware, an additional column will appear next to the y column showing the z values.
[C#]

The following example displays the Z value of the current vertex using 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;
   System.Windows.Forms.MessageBox.Show(editSketch.CurrentZ.ToString());  
}
[Visual Basic .NET]

The following example displays the Z value of the current vertex using VBNet.

  Public Sub EditSketch2()
    Dim editorUid As UID=New UIDClass()
    editorUid.Value="esriEditor.Editor"

    'You can get app from ICommand :: OnCreate() hook parameter
    Dim editSketch As IEditSketch2=TryCast(app.FindExtensionByCLSID(editorUid), IEditSketch2)

    System.Windows.Forms.MessageBox.Show(editSketch.CurrentZ.ToString())
  End Sub

See Also

IEditSketch2 Interface