ArcObjects Library Reference  (Editor)    

IEditProperties Interface

Provides access to members that control the properties of an edit session.

Product Availability

Available with ArcGIS Desktop.

When To Use

The IEditProperties interface is used to manage all of the properties an edit session has. Properties include: AutoSaveOnVersion, ReportPrecision, SelectedVertexSymbol, SketchSymbol, SketchVertexSymbol, SnapSymbol, StreamGroupingCount, StreamTolerance, and StretchGeometry.

Members

Description
Read/write property AutoSaveOnVersionRedefined Indicates whether the stop editing process should automatically reconcile an edit session and save the version without notification.
Read/write property ReportPrecision Controls the number of decimal places the editor reports numbers with.
Read/write property SelectedVertexSymbol Symbol used to draw the active vertex of the edit sketch.
Read/write property SketchSymbol Symbol used to draw the lines of the edit sketch.
Read/write property SketchVertexSymbol Symbol used to draw the vertices of the edit sketch.
Read/write property SnapSymbol Symbol used to draw the snap location.
Read/write property StreamGroupingCount Controls the number of points to group together when streaming.
Read/write property StreamTolerance Controls the streaming tolerance, measured in map units.
Read/write property StretchGeometry Indicates if the edit sketch is stretched when one of its vertices is moved.

CoClasses that implement IEditProperties

CoClasses and Classes Description
Editor The Object Editor Extension.
[C#]

This sample assums you have a reference to IEditor from the
OnCreate method in the code (IEditor m_editor).

 private void ChangeSketchSymbol()
    {
      IEditProperties editProperties;
      editProperties = m_editor as IEditProperties;
      ILineSymbol lineSymbol = new SimpleLineSymbol();
      IRgbColor sketchColor = new RgbColorClass();
      sketchColor.Red = 255;
      lineSymbol.Color = sketchColor;
      editProperties.SketchSymbol = lineSymbol;
    }

[Visual Basic 6.0]

Obtain an IEditProperties reference on the Editor object by performing a query interface (QI) from any other interface the Editor object implements.  The sample below first gets an IEditor reference, performs a query interface to the IEditProperties interface, and then changes the property controlling the color of the edit sketch segments from green to red.

Public Sub ChangeSketchSymbol()
  Dim pEditor as IEditor
  Dim pEditProperties As IEditProperties
  Dim pLineSymbol As ILineSymbol
  Dim pRgbColor As IRgbColor
  Dim pID As New UID

  'Get Editor references
  pID = "esriEditor.Editor"
  Set pEditor = Application.FindExtensionByCLSID(pID)
  Set pEditProperties = pEditor  'Query Interface

  'Change the sketch symbol to use a  red line
  Set pLineSymbol = New SimpleLineSymbol
  Set pRgbColor = New RgbColor
  pRgbColor.Red = 255
  pLineSymbol.Color = pRgbColor
  Set pEditProperties.SketchSymbol = pLineSymbol
End Sub
[Visual Basic .NET]
This sample assums you have a reference to IEditor from the 
OnCreate method in the code (Private m_editor as IEditor).
Private Sub ChangeSketchSymbol()
  Dim editProperties As IEditProperties
  editProperties = m_editor
  Dim lineSymbol As ILineSymbol
  Dim rColor As IRgbColor
  'Change the sketch symbol to use a red line
  lineSymbol = New SimpleLineSymbol
  rColor = New RgbColor
  rColor.Red = 255
  lineSymbol.Color = rColor
  editProperties.SketchSymbol = lineSymbol
End Sub

See Also

IDatasetEdit Interface | IDatasetEditInfo Interface | IEditEvents2 Interface | Editor Class | IEditTask.OnDeleteSketch Method | IEditor Interface | IEditEvents Interface | IEditTask.OnFinishSketch Method | IEditProperties Interface | ISnapEnvironment Interface | IEditTask.Deactivate Method | IEditAttributeProperties Interface | IEditTask.Activate Method | IEditLayers Interface | IEditTask.Name Property | IEditSketch Interface | IPictureMarkerSymbol Interface | ICartographicMarkerSymbol Interface | IArrowMarkerSymbol Interface | ICharacterMarkerSymbol Interface | IMultiLayerMarkerSymbol Interface | IMarkerSymbol Interface | ILineSymbol Interface

Example

Example