ArcObjects Library Reference (Editor)  

IEditSketchExtension2.CreatePreSketchFeedback Method

Called when a new feedback is needed before the sketch starts.

[Visual Basic .NET]
Public Function CreatePreSketchFeedback ( _
) As IDisplayFeedback
[C#]
public IDisplayFeedback CreatePreSketchFeedback (
);

Product Availability

Available with ArcGIS Desktop.

Remarks

The ::CreatePreSketchFeedback() method is called by the controller to initiate the creation of a custom feedback object associated to the EditSketchExtension.

This feedback object will be used prior that of the feedback object associated to the Edit Sketch.

Use this method to create your PreSketchFeedback object and pass it out so the Editor can use it.

[C#]
ESRI.ArcGIS.Display.IDisplayFeedback IEditSketchExtension2.CreatePreSketchFeedback()
{
  //m_editor has a reference to IEditor.
  IEditSketch editSketch = m_editor as IEditSketch;
  IPointCollection points = editSketch.Geometry as IPointCollection;

  //customFeedback is a custom feedback object.
  DispFeedback customFeedback = new DispFeedback();
  customFeedback.StartPt = points.get_Point(0);

  return customFeedback;
}
[Visual Basic .NET]
  Private Function CreatePreSketchFeedback() As ESRI.ArcGIS.Display.IDisplayFeedback
    'm_editor has a reference to IEditor.
    Dim editSketch As IEditSketch = TryCast(m_editor, IEditSketch)
    Dim points As IPointCollection = TryCast(editSketch.Geometry, IPointCollection)

    'customFeedback is a custom feedback object.
    Dim customFeedback As DispFeedback = New DispFeedback()
    customFeedback.StartPt = points.Point(0)

    Return customFeedback
  End Function 

See Also

IEditSketchExtension2 Interface | IDatasetEdit Interface | IDatasetEditInfo Interface | IEditTask.Name Property | Editor Class | ISnapEnvironment Interface | IEditEvents2 Interface | IEditTask.Deactivate Method | IEditAttributeProperties Interface | IEditor Interface | IEditSketch Interface | IEditTask.OnFinishSketch Method | IEditProperties Interface | IEditLayers Interface | IEditTask.Activate Method | IEditTask.OnDeleteSketch Method | IEditEvents Interface | IExtension Interface