Jump to content

How to extract integers from Getpoint?


Recommended Posts

Say this is my code:


(defun c:test()
 (setq list(getpoint "\nChoose point here")


When you click on your autocad drawing i know that it stores the coordinates in a x,y,z format in a list.. How can i extract those numbers?

Link to comment
Share on other sites

Firstly be careful to use a function as a variable which would popup a warning message then a conflict may take a place .


(setq p (getpoint "\n Specify point :"))
(setq x (car p)
       y (cadr p)
       z (caddr p)

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.

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