ArcObjects Library Reference (Editor)  

IEditSketchExtension2.CreateSketchGeometry Method

The geometry that will be used in the sketch when modifying a feature.

[Visual Basic .NET]
Public Function CreateSketchGeometry ( _
    ByVal feature As IFeature _
) As IGeometry
[C#]
public IGeometry CreateSketchGeometry (
    IFeature feature
);

Product Availability

Available with ArcGIS Desktop.

Remarks

Use this method when either 1) modifying an existing feature's geometry or 2) creating a new geometry for the EditSketch to use initially.

You can start with the geometry of the feature you have been given the reference to, possibly modify it, and pass it back out -or- create a completely new geometry for intial use by the EditSketch.

This is primarily used in conjunction with the modify task.

[C#]
public IGeometry CreateSketchGeometry(ESRI.ArcGIS.Geodatabase.IFeature feature)
{
  if (feature != null)
    return feature.Shape;
  else
    return null;
}
[Visual Basic .NET]
Public Function CreateSketchGeometry(ByVal feature As ESRI.ArcGIS.Geodatabase.IFeature) As IGeometry
  If Not feature Is Nothing Then
    Return feature.Shape
  Else 
    Return Nothing
  End If
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