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.
Function: entdel - AutoCAD Tutorial
From the course: Learning AutoLISP & Visual LISP
Function: entdel
- [Instructor] What if you want to delete or erase an object that's existing? We've already talked about how we can use command inside of our LISP so we could call the erase command. But let's look at a LISP function known as ENTDEL short for entity delete so we can delete an object using ENTDEL. All we have to provide it is the entity name. In this case, the entity name is the first object returned in the list from the ENTSEL. Let's first select our object. We'll go ahead and inspect and select our object. What's returned of course is a list and you notice the first object in that list is our entity name. Simply using the CAR we can get the first object in the list and then that will be the entity name we can use for ENTDEL. I go ahead and inspect. It says Invalid Entity name because we've actually erased it. It caused a confusion because we're trying to inspect it or look at it and you see that it's now gone. We would not have had any error at all if we were not trying to use…
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.