Greetings All,
I'm updating some old lisp routines and one of them is a routine that draws a leader by picking points, drawing lines among those points and instering an arrow block at the original point. I'd rather have people just draw a normal leader but the learning curve is rather steep here (we have old schooler's) so the intent is to rewrite the existing lisp without anyone knowing there were any changes.
The old lisp lets you pick the first point then as many points as needed until you hit enter or cancel. The problem I'm having is the furthest I've been able to get it is the first and second point. I assume a WHILE command would continue the points but can't figure out where it should be inserted.
Here's my current code:
and here's the WHILE code from the old lisp:
If that code is used in the leader command it errors and starts a regular leader entity.
Thanks,
Keith
I'm updating some old lisp routines and one of them is a routine that draws a leader by picking points, drawing lines among those points and instering an arrow block at the original point. I'd rather have people just draw a normal leader but the learning curve is rather steep here (we have old schooler's) so the intent is to rewrite the existing lisp without anyone knowing there were any changes.
The old lisp lets you pick the first point then as many points as needed until you hit enter or cancel. The problem I'm having is the furthest I've been able to get it is the first and second point. I assume a WHILE command would continue the points but can't figure out where it should be inserted.
Here's my current code:
Code:
(defun C:AL (/ pt1 pt2)
(command "_.LAYER" "_S" "DIMEN" "")
(setq pt1 (getpoint "\nStart of leader: ")
pt2 (getpoint pt1 "\nTo point: "))
(command "_.LEADER" pt1 pt2 "_Annotation" "" "n")
)
and here's the WHILE code from the old lisp:
Code:
(while (setq pt2 (getpoint pt2 "\n To point: "))
(command pt2)) (command "")
If that code is used in the leader command it errors and starts a regular leader entity.
Thanks,
Keith