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 - AutoCAD Tutorial
From the course: Learning AutoLISP & Visual LISP
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.
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.