@ami wrote:
....
All I want is a lisp that creates a vertical Xline, another lisp that creates horizontal Xline (with one click only). and another lisp that creates an Xline in a specific distance that the user supplied.
....
I need some clarification. The accepted-Solution routine does both vertical and horizontal Xlines through the same points as you pick them, but the description above sounds like you want separate ones for vertical and horizontal, which should be something more like this:
(defun C:XV (/ pt)
(while
(setq pt (getpoint "\nPoint through which to draw Vertical Xline: "))
(command "_.Xline" "_ver" "_none" pt "")
)
(princ)
)
(defun C:XH (/ pt)
(while
(setq pt (getpoint "\nPoint through which to draw Horizontal Xline: "))
(command "_.Xline" "_hor" "_none" pt "")
)
(princ)
)
And I don't understand what you mean by "an Xline in a specific distance that the user supplied" -- can you post an image to illustrate?
You may find ConstLines.lsp with its RX command useful -- available >>here<<. It's a combined Ray and Xline command in which, within one running of the command, you can switch between Xlines and Rays, between Horizontal and Vertical and Free-direction Xlines or between any of the compass directions and Free-direction Rays, as long as you want to keep going. It puts them on a dedicated non-plotting Layer, and when you're done, returns you to the Layer you were on before. See additional comments at that page and in the file.
Kent Cooper, AIA