samifox Posted June 4, 2014 Posted June 4, 2014 (setq plst (cons (getpoint "\nPick first point") plts )) (while (setq plst (cons (getpoint (getvar "LASTPOINT") "\nPick next point") plst )) ) Quote
jdiala Posted June 4, 2014 Posted June 4, 2014 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)))) ) (setq plst (cons (getpoint "\nPick first point") [color="red"]plst[/color] )) change this (while (setq plst (cons (getpoint (getvar "LASTPOINT") "\nPick next point") plst )) ) Quote
samifox Posted June 4, 2014 Author Posted June 4, 2014 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)))) ) thanks didnt think about this why (getpoint) clicks are not saved in lastpoint? Quote
jdiala Posted June 4, 2014 Posted June 4, 2014 thanksdidnt think about this why (getpoint) clicks are not saved in lastpoint? 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. Quote
samifox Posted June 4, 2014 Author Posted June 4, 2014 Bdw have u notice the code store nil recevied by getpoint? Quote
BIGAL Posted June 5, 2014 Posted June 5, 2014 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) ) Quote
MSasu Posted June 5, 2014 Posted June 5, 2014 Samifox, from what it seems, that system variable is set only by native commands, not AutoLISP. Quote
samifox Posted June 5, 2014 Author Posted June 5, 2014 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) ) thanks Bigal, i didnt know about that trick Samifox, from what it seems, that system variable is set only by native commands, not AutoLISP. yap....relay on lisp...not autocad:glare: thanks Quote
BIGAL Posted June 5, 2014 Posted June 5, 2014 I stumbled on the code can not remember where would acknowledge author. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.