Hmm, that script looks like it should work but it's throwing an error when I try and run it. The error is:
File "<string>", line 4, in GetAzimuthPolyline
AttributeError: 'str' object has no attribute 'lastpoint'
I'm testing the code on a shapefile containing only one line (to simplify things) but am still getting this error. Wondering if I need to add attribute fields describing the line's end points before I can run this code? Surely Arc already has this information so there must be a way of referring to it in Python that works?
Definately missing the field calculator right now, this would have all been done a dusted if I could use that!