ArcObjects Library Reference (Editor)  

IEditSketch2 Interface

Provides access to members that access and manipulate the edit sketch. Note: the IEditSketch2 interface has been superseded byIEditSketch3. Please consider using the more recent version.

Product Availability

Available with ArcGIS Desktop.

When To Use

IEditSketch2 extends the functionality of the edit sketch by adding support for making the sketch z-aware and for setting Z values on a vertex as well as managing the current EditSketchExtension. IEditSketch2 also has three functions that fire event notifications when vertices are added, modified, or deleted. For example, whenever a vertex is deleted from an edit sketch, VertexDeleted should be called so that any clients listening for this event can respond.

Members

Description
Method AddPoint Adds a point to the edit sketch. If allowUndo is true, a new operation will be created.
Read/write property CurrentZ Current Z value for the edit sketch.
Read/write property EditSketchExtension The current edit sketch extension.
Method FinishSketch Completes the current edit sketch.
Method FinishSketchPart Completes a part for the current edit sketch.
Read/write property Geometry Geometry stored in the edit sketch.
Read/write property GeometryType Type of the geometry stored in the edit sketch.
Read-only property LastPoint The last point in the edit sketch.
Read/write property MAware Indicates if the edit sketch geometry will contain Ms.
Method ModifySketch Call to notify listeners that the sketch has been changed.
Read-only property Part The index of the current part of the sketch.
Read-only property PartComplete Indicates whether FinishPart has been called on the edit sketch.
Method RefreshSketch Invalidates the portion of the display that is occupied by the sketch.
Read-only property Segment The index of the current segment of the sketch.
Read-only property Vertex The index of the current vertex of the sketch.
Method VertexAdded Call to notify listeners that a sketch vertex has been added.
Method VertexDeleted Call to notify listeners that a sketch vertex has been deleted.
Method VertexMoved Call to notify listeners that a sketch vertex has been moved.
Read/write property ZAware Indicates if the edit sketch geometry will contain Zs.

Inherited Interfaces

Interfaces Description
IEditSketch Provides access to members that access and manipulate the edit sketch.

CoClasses that implement IEditSketch2

CoClasses and Classes Description
Editor The Object Editor Extension.

Remarks

The IEditSketch2 interface is on the Editor CoClass.

[C#]

You can get a reference of IEditSketch2 by casting from any other interfaces on the Editor CoClass.

The following  code excerpt shows an example of this in C#.

  //You can get app from ICommand :: OnCreate() hook parameter
  UID editorUid = new UIDClass();
  editorUid.Value = "esriEditor.Editor";
  IEditSketch2 editSketch = app.FindExtensionByCLSID(editorUid) as IEditSketch2;


 

[Visual Basic .NET]

You can get a reference of IEditSketch2 by casting from any other interfaces on the Editor CoClass.

The following  code excerpt shows an example of this in VBNet.

'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)