wait for line to be drawn

wait for line to be drawn

Anonymous
Not applicable
945 Views
3 Replies
Message 1 of 4

wait for line to be drawn

Anonymous
Not applicable

i want to start a lisp routine and let the user draw a line of what ever length they want, and end it by pressing enter, then i want my lisp routine to continue and finish the routine

 


;;REVCLOUD
(defun c:rev ()
(setq oldlayer (getvar "clayer"))
(command "layer" "new" "REVISION" "color" "6" "REVISION" "")
(setvar "clayer" "REVISION")

(command "pline" "\npress enter when done")

this where i want it to wait til the user hits enter


(command "revcloud" "a" ".25" ".25" "o" "last" "")
(setvar "clayer" oldlayer))

0 Likes
946 Views
3 Replies
Replies (3)
Message 2 of 4

ВeekeeCZ
Consultant
Consultant
(command "pline")
(while (< 0 (getvar 'cmdactive))
(command pause))
0 Likes
Message 3 of 4

Anonymous
Not applicable

Or just kill the existing command


(command "UNDEFINE" "_PLINE")


and define your own pline function

 

(defun c:pline ()
 (command-s "._PLINE")
 (alert (strcat "The length of the PLINE is: " (rtos(getpropertyvalue  (entlast)  "length"))))
)

 

 

0 Likes
Message 4 of 4

ВeekeeCZ
Consultant
Consultant

wow, this is new to me... 

 

(command-s "._PLINE")

Could this replace my construction using 'cmdactive anywhere in the code? Any other tricks like this? 🙂

0 Likes