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


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

IMapControl3.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

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