A couple of suggestions, if you have a pline no need to explode if using VL, (setq start (vlax-curve-getstartpoint Obj ))(setq end (vlax-curve-getendpoint Obj ))
Also not sure why you dont just work out everything in radians it is very rare for me to have to use rtd or dtr. Except for entry of angle but all coding would then be in radians.
If a pline is more than l section what then ? Same in my code may not be correct.
The only reason I did not post a do all auto is simple draw a line left to right, then a second right to left, one answer will go up the other will go down. with plines same thing depends on direction.
The red lines show the length of the original line or pline, Your code middle not sure about this, drew 2 plines L-R & R-L 10 10 45. Mine on right choice up down depending on end picked. Also note your answer increased overall length this is up to RIA to confirm the final length required.
There are other posts floating around on multiple forums seeking multiple solutions for a number of patterns like this.