@JarleVelle1442 wrote:
Is it possible to make it remember the arc length, so we dont have to type it each time?
If in my code in Message 21, replace this much at the top:
(defun c:LineJump (/ a d e i o p p1 p2 p3) ;; Adds a 'hop' to a LWPolyline or Line
(setq a (getdist "\nSpecify arc length: "))
with this:
(defun c:LineJump (/ d e i o p p1 p2 p3) ;; Adds a 'hop' to a LWPolyline or Line
(initget (if *LJArc* 6 7)); no 0, no negative, no Enter on first use
(setq *LJArc*
(cond
( (getdist
(strcat
"\nSpecify arc length"
(if *LJArc* (strcat " <" (rtos *LJArc*) ">") ""); offer default if present
": "
); strcat
); getdist
); User-input condition
(*LJArc*); prior value on Enter when permitted
); cond
); setq
AND replace the later occurrences of the 'a' variable with *LJArc*:
(setq p1 (vlax-curve-getpointatdist e (+ d *LJArc*)))
(setq p2 (vlax-curve-getpointatdist e (- d *LJArc*)))
NOTE the removal of 'a' from the localized variables list. *LJArc* becomes a global variable that will remain after the routine is finished, with a name that is not likely to be overwritten by any other routine, as 'a' might be.
Kent Cooper, AIA