This document is archived and information here might be outdated.  Recommended version.


IMapControlDefault.TrackLine Method (ArcObjects .NET 10.4 SDK)
ArcObjects Library Reference (Controls)  

IMapControlDefault.TrackLine Method

Rubber-bands a polyline on the MapControl.

[Visual Basic .NET]
Public Function TrackLine ( _
) As IGeometry
[C#]
public IGeometry TrackLine (
);
[C++]
HRESULT TrackLine(
  IGeometry** polyline
);
[C++]

Parameters polyline [out, retval]
polyline is a parameter of type IGeometry

Product Availability

Available with ArcGIS Engine.

Description

TrackLine returns a geometry object that implements IPolyline.

Remarks

Use the TrackLine method within the IMapControlEvents2::OnMouseDown event to rubberband a user defined line. The IMapControlEvents2::OnMouseMove event will be triggered during the track, but no IMapControlEvents2::OnMouseUp event will occur. The ESC key on the keyboard can be used during the track to cancel the TrackLine.

Calling ITopologicalOperator::Simplify on the digitized line will ensure that it is topologically correct.

See Also

IMapControlDefault Interface | IMapControl4.TrackCircle Method | IMapControl3.TrackCircle Method | IMapControlDefault.TrackCircle Method | IMapControl4.TrackPolygon Method | IMapControlDefault.TrackPolygon Method | IMapControl3.TrackPolygon Method | IMapControl3.TrackRectangle Method | IMapControl4.TrackRectangle Method | IMapControlDefault.TrackRectangle Method