In a way, the command i seek already exists, but it has issues.
Example:
(defun C:TT ()
(command "NEWDOBJ" "TRACEDESIGNLINES")
)
I use this to partially close (more like deactivate) whatever my active design line currently is and trace a polyline thus making a new design line from a 3Dpolyline.
However, I have absolutely no idea why this works. The only thing I can think of is NewDobj starts doing what it is supposed to do, but gives focus back to lisp sooner than it should thus enabling it to start the TraceDesignLines (or any other single command IE Move), but if the lisp trys to execute anything beyond that point eventually the NewDobj command will take focus again and it cannot be closed without user input. If I stop input from lisp after issuing another command the NewDobj command is somehow canceled and all focus will in the new command I seemingly slipped past NewDobj. Example of NewDobj forcing its way back in:
;any command can take context and cancel the NewDobj if lisp ends
(defun C:TT2 ()
(command "NEWDOBJ" ".move")
(princ)
)
;but if lisp trys to keep running NewDobj will eventually take back over.
(defun C:TT3 ()
(command "NEWDOBJ" "move" (entlast) "" nil)
(princ)
)
The bottom line: I think the NewDobj command is subdivided into issueing multiple commands within itself and that allows lisp to artificially sneak back in where it shouldn't be able to. The next part of the problem is that the NewDobj command cannot be closed through traditional means of issuing "" or nil.
This is all very confusing I know, but I really believe this is a design flaw that minimal changes could provide large gains to the community with regards to design line automation tasks.