samifox 发表于 2022-7-5 22:57:06

(getpoint) wont set new coordi

(setq plst (cons (getpoint "\nPick first point") plts ))      (while    (setq plst (cons(getpoint(getvar "LASTPOINT") "\nPick next point") plst ))   )

jdiala 发表于 2022-7-5 23:07:24

Shay,
 
Don't really understand your question. I think you are implying about the rubber band effect of getpoint function.
 
try this:
 

(setq plst (cons (getpoint "\nPick first point") plst ))   (while plst    (setq plst (cons(getpoint(car plst) "\nPick next point") plst ))        ;(entmakex (list (cons 0 "LINE") (cons 10 (car plst)) (cons 11 (cadr plst)))))
 

samifox 发表于 2022-7-5 23:14:22

 
thanks
didnt think about this
 
why (getpoint) clicks are not saved in lastpoint?

jdiala 发表于 2022-7-5 23:23:00

 
Bump, sorry don't know the answer.
 
On your code that lastpoint was saved on your plst list but just didn't show the visual effect that you want to achieve.

samifox 发表于 2022-7-5 23:34:21

Bdw have u notice the codestorenil recevied by getpoint?

BIGAL 发表于 2022-7-5 23:35:37

This is short and sweet may be usefull, lots of get pline pts code then just erase last but points still exist.
 

; create pline by picking points press enter when finished(command "_pline") (while (= (getvar "cmdactive") 1 ) (command pause))

MSasu 发表于 2022-7-5 23:43:58

Samifox, from what it seems, that system variable is set only by native commands, not AutoLISP.

samifox 发表于 2022-7-5 23:49:55

 
thanks Bigal, i didnt know about that trick
 
 
 
yap....relay on lisp...not autocad:glare:
thanks

BIGAL 发表于 2022-7-6 00:00:40

I stumbled on the code can not remember where would acknowledge author.
页: [1]
查看完整版本: (getpoint) wont set new coordi