This document is archived and information here might be outdated. Recommended version. |
ArcObjects namespaces > Controls > ESRI ArcGIS Controls > Interfaces > IM > IMapControlDefault Interface > IMapControlDefault.TrackLine Method (ArcObjects .NET 10.4 SDK) |
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
TrackLine returns a geometry object that implements IPolyline.
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.
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