Parser:
Python
Expression:
GetAzimuthPolyline( !Shape!)
Code Block:
import math
def GetAzimuthPolyline(shape):
radian = math.atan((shape.lastpoint.x - shape.firstpoint.x)/(shape.lastpoint.y -
shape.firstpoint.y))
degrees = radian * 180 / math.pi
return degrees
*Catatan :
- (spasi!shape!)
- sebelum radian,degrees, dan return diberi space
- jika bermasalah lagi, coba turn off editor