Yes, this is possible, although no one think a lisp is needed because you can do this using the polyline command, but just to keep programming here it is my version of it
;;; Creates a fixed lwpolyline based on different given distances
;;; By Isaac A 20240128
;;; https://www.cadtutor.net/forum/topic/79256-lisp-for-creating-new-line-with-a-sum-of-numbers-of-length/
(defun c:fpl (/ a b c d dw e f l oe)
(vl-load-com)
(vla-startundomark (setq dw (vla-get-activedocument (vlax-get-acad-object))))
(setq oe (getvar 'cmdecho))
(setvar 'cmdecho 0)
(setq a (getpoint "\nPick the starting point")
b (getpoint "\Pick a second point for the direction" a)
c (angle a b)
f (list a)
)
(initget 2)
(if (not (= (setq d (getreal "\nType the starting distance: ")
f (append f (list (polar a c d))) ) (or 0 nil)))
(progn
(initget 6)
(while (setq e (getreal "\nType the next distance: "))
(setq d (+ d e)
f (append f (list (polar a c d)))
)
)
(entmakex (append (list '(0 . "LWPOLYLINE")
'(100 . "AcDbEntity")
'(410 . "Model")
'(8 . "Test_lwpolylines")
'(62 . 40)
'(100 . "AcDbPolyline")
(cons 90 (length f))
)
(mapcar (function (lambda (l) (cons 10 l))) f)
)
)
)
)
(setvar 'cmdecho oe)
(vla-endundomark dw)
(princ)
)