From the course: Learning AutoLISP & Visual LISP

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Function: getpoint

Function: getpoint

- [Instructor] Another useful get data function from LSP is the getpoint function. The getpoint LSP function will return a list containing three numbers. The three numbers represent the X, the Y and the Z where the user picked when he was prompted. Let's go ahead and get a point from a user. In this case, the user would be me. GETPOINT, and we are simply going to provide the prompt. Specify a point in space will be our prompt. We could, of course, type in any prompt there, and we'll inspect this code. It says, Specify a point in space. Now, if I press Enter and don't specify, the result is simply nil. But if I do go back, and let's inspect again, and pick a point in space, it returns a list with an X, a Y and a Z, showing the coordinates where I picked.

Contents