@BIGAL Since your comment is baiting me to do a better program - Here you go.
This uses Lee's LM:Selectif function to filter and provide missed / invalid pick error handling.
This could still be made better, but this is all I have time for (indeed I spent too much time on it already).
EDIT: I realized the jump distance settings didn't make sense the distances have to be the same for an ARC, if different y, then use an ELLIPSE.
EDIT2: Added a feature to combine the jump lines and arcs into a polyline. Doesn't work with the ellipses however. Also changed the behavior so that the gap distance specified is for the gap from the intersecting line to one side of the arc, not the total width of the arc. I did this because the gap width and jump height are now equivalent when the values are the same (i.e. rad to rad. - not dia. to rad.).
EDIT3: Realized that I had a redundant IF statement after the main WHILE loop - removed.
EDIT4: Simplified to always use an ARC - I don't know what I was thinking with the Ellipse version! Now will always work if you want to join the resulting lines.
EDIT5: Added Error looping to make sure settings values are not invalid and allows the user to correct without re-entering the program.
EDIT6: Added undo mark into error handler. Corrected local variables (removed ones no longer used and added one).
(defun c:JumpLine (/ pick oldecho jump c0 c1 c2 c3 p0 ss res *error*)
; Load Visual LISP and start and undo mark
(vl-load-com)
(defun *error* (msg)
(if (not (wcmatch (strcase msg T) "*break*,*cancel*,*quit*,*exit*"))
(princ (strcat "\nError: " msg "\n"))
(princ "\nProgram Aborted.\n")
)
(setvar "cmdecho" oldecho)
(vla-EndUndoMark (vla-get-activedocument (vlax-get-acad-object)))
(princ)
)
(vla-StartUndoMark (vla-get-activedocument (vlax-get-acad-object)))
; Get value of cmdecho sysvar and toggle it off.
(setq oldecho (getvar "cmdecho"))
(setvar "cmdecho" 0)
; Set global values.
(if (not *jdx*)(setq *jdx* 0.125))
(if (not *jdy*)(setq *jdy* 0.125))
(setq pick T)
(while
(setq pick
(LM:selectif "\nSelect Line to Break [Exit/Settings]: <Exit> "
(lambda ( x ) (wcmatch (cdr (assoc 0 (entget (car x)))) "LINE,LWPOLYLINE"))
entsel
'("Exit Settings")
)
)
(cond
((= pick "Settings")
(setq jump 0.0)
(While (= Jump 0.0)
(setq jump *jdx*)
(if (and (setq jump (getreal (strcat "\nSpecify Jump gap distance for both sides <" (rtos *jdx* 2 4) "> : "))) (> jump 0.0))
(setq *jdx* jump)
(if (= jump 0.0)(princ "\nInvalid Value - must be greater than 0."))
)
)
(setq jump 0.0)
(While (or (= Jump 0.0)(>= jump (* 2 *jdx*)))
(setq jump *jdy*)
(if (and (setq jump (getreal (strcat "\nSpecify Jump Height <" (rtos *jdy* 2 4) "> : "))) (> jump 0.0) (< jump (* 2 *jdx*)))
(setq *jdy* jump)
(cond
((= jump 0.0)(princ "\nInvalid Value - must be greater than 0."))
((>= jump (* 2 *jdx*))(princ "\nInvalid Value - must be less than 2X the gap."))
)
)
)
)
(( = Pick "Exit")(setq pick nil))
((and ( = (type pick) 'LIST)(= (type (car pick)) 'ENAME))
(setq ss (ssadd (car pick)))
(while (setq c0 (getpoint "\nSpecify intersection: "))
(setq p0 (osnap (cadr pick) "_nea")
c1 (polar c0 (angle p0 c0) *jdx*)
c2 (polar c0 (angle c0 p0) *jdx*)
c3 (polar c0 (+ (angle p0 c0) (/ pi 2)) *jdy*)
)
(command "._break" pick "_f" "_non" c1 "_non" c2); break
(command "._arc" "_non" c1 "_non" c3 "_non" c2)
(setq p0 (polar c1 (angle p0 c0) *jdx*)
ss (ssadd (entlast) ss)
pick (nentselp p0)
ss (ssadd (car pick) ss)
)
)
(Initget "Yes No")
(if (or (setq res (getkword "\n Join jumps into a polyline? [Yes/No] <Yes>: ")) (not res))
(command "._pedit" "_Multiple" ss "" "_yes" "_Join" "" "")
)
)
)
)
(vla-EndUndoMark (vla-get-activedocument (vlax-get-acad-object)))
(princ)
)
;;---------------------=={ Select if }==----------------------;;
;; ;;
;; Provides continuous selection prompts until either a ;;
;; predicate function is validated or a keyword is supplied. ;;
;;------------------------------------------------------------;;
;; Author: Lee Mac, Copyright © 2011 - www.lee-mac.com ;;
;;------------------------------------------------------------;;
;; Arguments: ;;
;; msg - prompt string ;;
;; pred - optional predicate function [selection list arg] ;;
;; func - selection function to invoke ;;
;; keyw - optional initget argument list ;;
;;------------------------------------------------------------;;
;; Returns: Entity selection list, keyword, or nil ;;
;;------------------------------------------------------------;;
(defun LM:SelectIf ( msg pred func keyw / sel ) (setq pred (eval pred))
(while
(progn (setvar 'ERRNO 0) (if keyw (apply 'initget keyw)) (setq sel (func msg))
(cond
( (= 7 (getvar 'ERRNO))
(princ "\nMissed, Try again.")
)
( (eq 'STR (type sel))
nil
)
( (vl-consp sel)
(if (and pred (not (pred sel)))
(princ "\nInvalid Object Selected.")
)
)
)
)
)
sel
)