Jump to content

(getpoint) wont set new coordinates to "LASTPOINT" variable...why?


samifox

Recommended Posts

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

   )

Link to comment
Share on other sites

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 ))

   )

Link to comment
Share on other sites

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?

Link to comment
Share on other sites

thanks

didnt 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.

Link to comment
Share on other sites

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)
)

Link to comment
Share on other sites

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 8)

 

 

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

 

yap....relay on lisp...not autocad:glare:

thanks

Link to comment
Share on other sites

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.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...