The MYLINE subfunction is the guts of this example. It has three arguments, the bearing, the distance, and a startpoint. This was completely made up by me.
The FOO subfunction is just an example of how to use the MYLINE subfunction.
pt1 = ThisDrawing.Utility.GetPoint(, "Pick Start Point")
This line is just so you have a startpoint - your main function may get a startpoint from somewhere else (like maybe the end of an existing line or something)
Call myLine(1.3, 3.5, pt1)
This line is calling the MYLINE sub - the 1.3 is just an angle I made up and the 3.5 is just a distance I made up.
You don't HAVE to use it like this - you can simply call the ADDLINE function, but I was just trying to show how you might calculate points first and THEN call the ADDLINE function since that is easier than creating a random line and then trying to change it's endpoints.