@Kent1Cooper wrote:
If you are willing to be required to pick on a Polyline [or Line or whatever you want the new Line to get its direction from] near a particular end [in your case, near the end that touches the yellow outline], I can imagine a pretty easy way to do this. Is that an acceptable limitation?
Assuming that's acceptable, and that you do want the blue Lines at the stated length even if the reference Polyline bends before it reaches that length, here's what I had in mind [lightly tested]:
(defun c:adj (/ esel pt-start pt-angle)
(initget (if *adjdist* 6 7)); no zero, no negative, no Enter on first use
(setq *adjdist* ; global variable for default
(cond
( (getdist
(strcat
"\nUNSA KATAAS GAR?"
(if *adjdist* (strcat " <" (rtos *adjdist*) ">") "")
; offer prior value as default if present [current mode/precision settings]
": "
); strcat
); getdist
); User-input condition
(*adjdist*); default on Enter when allowed
); cond
); setq
(while
(setq esel (entsel "\nSelect reference near touching end or <exit>: "))
(setq
pt-start (osnap (cadr esel) "_end")
pt-angle (osnap (cadr esel) "_mid")
); setq
(command "LINE"
"_non" pt-start
"_non" (polar pt-start (angle pt-start pt-angle) *adjdist*)
""
); command
); while
(prin1)
)
(prompt "\nType 'adj' to run the program.")
It remembers your length and offers it as default on subsequent use. You pick on the reference Polyline in an appropriate place, once, rather than at two specific points. [In your sample drawing, you will need to designate which of the two overlapping ones you want, but it won't matter which one you choose.] You don't need to use ESCape to end it [though you can] -- Enter or space will do, and <exit>ing is the default that you get from either of those.
But you need to pick on a reference Polyline [or Line, or MLine segment, or anything straight] at a location where ENDpoint Object Snap will go to where it meets what you want the Lines drawn from [your yellow outline], and where MIDpoint Object Snap will go to the midpoint of that reference, not [for example] to somewhere on the yellow outline.
It could use (getpoint) instead of (entsel), so that you wouldn't need to designate which one of overlapping ones you want it to Osnap to, but it could have trouble if you miss by far enough -- as written, it ensures you got something before it proceeds. And it could be made to verify that you picked on something straight, and control the Layer, and have the usual enhancements added [Osnap control instead of explicitly calling for "_non", *error* handling, Undo begin/end wrapping]. But first see whether it does what you want otherwise.
Kent Cooper, AIA