From the course: Learning AutoLISP & Visual LISP

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Functions: entsel and entget

Functions: entsel and entget - AutoCAD Tutorial

From the course: Learning AutoLISP & Visual LISP

Start my 1-month free trial

Functions: entsel and entget

- [Narrator] So far the functions we have worked with have prompted the user for information, but now we want to prompt the user, not just for information, we want the user to tell us an entity, we want the user to select an entity, then to be able to work with that entity, and to do that, we're going to use the LISP function named ENTSEL, or entity select. We'll go ahead and assign this to a variable, in this case it will be RETSEL, and the argument for ENTSEL LISP function, simply the prompt to the user or what we are asking them to provide. Now this is a single entity selection method, we'll look at selection sets and multiple selection of objects in chapter eight. So let's go ahead and test this out, inspect, it says select entity. I go ahead and pick this line, and what is returned is a LIST. The LIST is made up of two objects, first object is the entity name, the second object is a LIST containing the X, Y, and Z coordinate location that the user picked to select the object. So…

Contents