ArcObjects Library Reference (Editor)  

IEditSketchExtension2.CreateFeedback Method

Called when a new feedback is needed.

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

Product Availability

Available with ArcGIS Desktop.

Remarks

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

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

[C#]
ESRI.ArcGIS.Display.IDisplayFeedback IEditSketchExtension2.CreateFeedback()
{
  //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]
  Public Function CreateFeedback() As IDisplayFeedback
    Dim editSketch As IEditSketch = TryCast(m_editor, IEditSketch)
    Dim points As IPointCollection = TryCast(editSketch.Geometry, IPointCollection)
    Dim feedback As DispFeedBack = New DispFeedBack  'a custom feedback object
    feedback.StartPt = points.Point(0)
    Return feedback
  End Function

See Also

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