Jump to content
duanuys

How to extract integers from Getpoint?

Recommended Posts

duanuys

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?

Share this post


Link to post
Share on other sites
Tharwat

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

Share this post


Link to post
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
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

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