Mexican Spotted Owl, stretching...

ArcGIS Tools
ArcView 3.x Extensions
GIS Consultation
Unit Converter
Jenness Enterprises


Line Direction Tool

NAME:  Line Direction Tool, v. 2.1   (Click Name to Download)

Aka:  line_dir.avx

Last modified:  October 10, 2005

TOPICS:  ArcView 3.x, View, Analysis, Tools, Direction, Polyline, Polygon, Line, Flip

AUTHOR:  Jeff Jenness
         GIS Analysis and Application Design
         Jenness Enterprises
         3020 N. Schevene Blvd.
         Flagstaff, AZ  86003    USA 
         (928) 607-4638


DESCRIPTION:  This tool gives you an easy way to check the direction of a polyline or the boundary of a polygon (which ought to be clockwise).  It makes a graphic on the screen that changes color from red at the beginning to blue at the end, and it includes arrows at the beginning and end to make it more intuitive.

This extension also allows you to flip the direction of any or all polylines in a theme.

REVISIONS: The 1.3 update corrects a rare bug that occurs when the polyline nodes are coincident with the nearest vertex in the list of vertices (i.e. the 1st and 2nd vertices are located at exactly the same point, or the (n-1)th and the nth vertices are located at exactly the same point.

Version 2.0 (February 27, 2005) makes the following changes:


Adds the option to flip selected streets.


Allows you to draw lines on multiple streets at once by drawing a rectangle over them.


Modifies the behavior of the Line Direction tool so that it doesn’t change the original selection set of the Polyline theme.

Version 2.1 (October 10, 2005) makes a minor change, forcing the screen to redraw after new graphics are created.

REQUIRES: This extension requires that the file "avdlog.dll" be present in the ArcView/BIN32 directory (or $AVBIN/avdlog.dll) and that the Dialog Designer extension be located in your ArcView/ext32 directory, which they usually are if you're running AV 3.1 or better. The Dialog Designer doesn't have to be loaded; it just has to be available. If you are running AV 3.0a, you can download the appropriate files for free from ESRI at:

Recommended Citation Format: For those who wish to cite this extension, the author recommends something similar to:

Jenness, J. 2005. Line Direction Tool (line_dir.avx) extension for ArcView 3.x, v. 2.1. Jenness Enterprises. Available at:

Please let me know if you cite this extension in a publication ( I will update the citation list to include any publications that I am told about.

General Instructions:

1)   Put the extension file “line_dir.avx” file into the ArcView extensions directory (../../Av_gis30/Arcview/ext32/).

2)   After starting ArcView, load the extension by clicking on File and then Extensions… , scrolling down through the list of available extensions, and then clicking on the checkbox next to the extension called “Line Direction Tool”

3)   Open a view and add the polyline and/or polygon themes that your are interested in.

Checking Directions of Polylines:

1) Make your themes active by clicking on the theme name.

2) Click the button to enable the Line Direction tool.

3) Click on, or draw a rectangle over, any polylines or polygons in your active themes. The tool will draw a multicolored graphic line over those shapes to show you their directions.

4) Continue clicking on polylines or polygons to draw additional graphics. If you would like to delete all previous graphics before making a new one, hold down the [SHIFT] key as you click on the lines.

5) These multicolored lines are graphics on the screen so they can be deleted by selecting them and hitting the “Delete” key. Alternatively, hold down the [SHIFT] key and click on a blank place in your view.

Flipping Polylines: This function will change the direction of the polyline in your theme by reversing the order of the vertices in that polyline. IMPORTANT: This modifies your polyline theme and the change is permanent. There is no ‘Undo’ for this operation (other than re-running the tool and flipping the polylines back). The author recommends that you make a backup copy of your theme if you wish to maintain the original condition of that theme.

1) Select any polylines in your polyline theme that you would like to flip. If no polylines are selected, then all polylines will be flipped.

2) Click the menu item “Flip Polylines in Polyline Theme…” menu item in the View “Theme” menu:

3) Specify your theme and ID field. ID values are not critical; they are only used in the output report.

4) This change is permanent, so you will now be asked to confirm this action. This confirmation will also tell you how many polylines will be flipped.

5) When the extension is finished, it will produce a report describing what it did:

Enjoy! Please contact the author if you have problems or find bugs.

            Jeff Jenness                            

            Jenness Enterprises                

            3020 N. Schevene Blvd.                     (928) 607-4638

            Flagstaff, AZ  86004


An Adobe PDF version of this manual is included with the extension. 

Please visit Jenness Enterprises ArcView Extensions site for more ArcView Extensions and other software by the author.  We also offer customized ArcView-based GIS consultation services to help you meet your specific data analysis and application development needs.