IMHO, if you're not using Visual Studio Community (free) or familiar with .NET API, you really should stop asking for .NET code, as you won't be able to do anything with it even if someone gives it to you.
We do not keep the original plines, but can always get them back... here's an old LISP that I've since ported to .NET as a ContextMenu (right click menu) to quickly extract polylines for one or more Alignments.
Since C3D Alignment object's EndingStation and StartingStation properties are read-only for LISP API, OP should use something like this, combined with (command "._lengthen" "_t") to set the total length, or (command "._lengthen" "_de") to increase/decrease overall length, then manually modify the Alignment via grips or remove/add geometry.
(vl-load-com)
(defun c:GetAlgnPlines (/ *error* acDoc clayer ss)
(defun *error* (msg)
(if ss (vla-delete ss))
(if acDoc (vla-endundomark acDoc))
(cond ((not msg)) ; Normal exit
((member msg '("Function cancelled" "quit / exit abort"))) ; <esc> or (quit)
((princ (strcat "\n** Error: " msg " ** "))) ; Fatal error, display it
)
(princ)
)
(if (ssget "_:L" '((0 . "AECC_ALIGNMENT")))
(progn
(vla-startundomark
(setq acDoc (vla-get-activedocument (vlax-get-acad-object)))
)
(setq clayer (getvar 'clayer))
(vlax-for x (setq ss (vla-get-activeselectionset acDoc))
(vla-put-layer (vlax-invoke x 'getlwpolyline) clayer)
)
)
)
(*error* nil)
)
Viewing the source code first may help reduce reluctance in the future:
https://www.jetbrains.com/decompiler/#
FWIW, CopIlot uses ChatGPT, so it really depends on your subscription as to which tier/models you have access to.
As example, with M365 subscription you have access to ChatGPT-4 model (specifically the GPT-4-turbo variant), which is better than the free ChatGPT models (last I checked), but having a ChatGPT subscription provides you access to better models.
HTH