Why not like this :
What does this do: (command "\\")? Never seen it before.
Unfortunately this doesn't work either. It also gives me the previous last point, the one before the line command is started.
Unfortunately this doesn't work for me, because the command is terminated as soon as you pick the first point.
Unfortunately, this tells me you are trying to build a function that may be trying to do too much. Are you building your functions like this (or just one giant function that does 50 different things)?
;; drawline
;; Issues the line command and returns the first picked point.
)
;; my main function
;;
(setq lpt2
(drawline
)) ; -Draw line and get the ; first picked point.
;; NOTE: Without the line below, the prompt will be make immediately,
;; but if you want to delay the prompt, uncomment the line below.
; (while (eq 1 (logand 1 (getvar 'cmdactive))) (command pause))
(princ "\nFirst Picked point of the line command is: ") ; -prompt the first picked point lpt2
)
)
I'm trying to write a function that labels water lines with as little user input as possible.
Ideally, I only need to click once on each line and the label is there, correctly aligned.
I could go with getpoint instead, but I need the perpendicular snap and it's also nice to have a preview of the angle the lines will be drawn at.
It's a relatively simple lisp that doesn't require many sub functions, but there are some.
Everything works great with multiple lines, just not with a single one.