This script will select the first layer in the TOC, if it is a polyline and has at least one line/record selected, it will add two fields called AriAngle (Arithmetic Rotation aka Polar) and GeoAngle (Geographic Rotation aka North Azimuth) and populate the fields with angles for each selected line/record based upon its from to direction.
CREATED BY: James Zazula, GIS Analyst, City of Barrie, Barrie, Ontario, Canada
CREATED BY: James Zazula, GIS Consultant, GIS North, Barrie, Ontario, Canada
Assistance provided by Kirsten Lowerey, Planning Technician, City of Barrie, Ontario, Canada
If you would like to make improvements to the script, feel free to do so and send me the new script

Created in ArcGIS 8.3, not tested in 9.x
Portion of script based upon ESRI ILINE Example
Portion of script based upon DOUGLAS R. GUESS - LANCASTER COUNTY ASSESSOR/REGISTER OF DEEDS OFFICE
NOTES:
A least one polyline must be selected
The script will only work if the polyline layer is the first layer on the TOC
To calculate the value of PI = 4 * Atn(1)
To convert Angles to Radians (Radians = Angle in Degrees * (PI/180))
To convert Radians to Angles (Angles in Degrees = Radians * (180/PI))
Calculated Angle Arithmetic Angle Geographic Angle
90 90 0
| | |
| | |
180 | | |
-180 ----------- 0 180 ---------- 0 270 ----------- 90
| | |
| | |
| | |
-90 270 180
This script will choose the first layer in the TOC and makes sure that it is a polyline
This script will make sure at least on polyline/record is selected
You do not have to be in edit mode for this script to work, just run the macro FindPolylineAngle