Skip to main content

AW202508hr

Page 48

AutoCAD

by: Paul Li

Free Samples -

The Summer Edition SUMMER BEGINS

1. DELLAYER / LAYDEL

’ve always looked forward to Summer. During my younger years I remember having to start the school year at the beginning of Fall. Attending classes continued through both the Winter & Spring seasons. Finally, when Summertime rolled around all the classes were over. There was no longer a need to complete homework assignments or study for pop quizzes and exams. Then after I graduated and started employment in my career field, I continued to look forward to Summer because that’s when daylight lasts the longest. As early as 6:00 am in the morning the sun would rise. There would be plenty of daylight until the sun eventually set well after 8:00 pm. So whenever I was able to leave work on time there would still be an additional 2 to 3 hours of daylight available for me to enjoy. Likewise in this Summer edition of free samples I’ll be pointing out three free open-source lisp functions that have accompanied AutoCAD for a very long time with lasting impact even to the current version of AutoCAD.

Since the initial release back in 1982 Layers have always been an important feature offered in AutoCAD. Not only did AutoCAD provide the ability to name Layers but also to manipulate their properties like turning them Off or On. Then with the introduction of AutoLISP in version 2.18, AutoCAD by version 2.6 included a free open-source lisp file called DelLayer.lsp (see Figure 1).

I

FREE STUFF Well, it has been a couple of years now since I first started on the “Free Samples” series. In these articles I review the many open source lisp files that come packaged with AutoCAD free for the taking. This time I’m going to continue the “Free Samples” series by focusing on three open-source lisp routines that were introduced in different versions of AutoCAD. Like my previous “Free Samples” articles, I’ll first introduce the lisp command, explain what it does and discuss what came of it as AutoCAD continues to develop to the current version. 48 AUGIWORLD Magazine | August 2025

Figure 1

The name of the added command is a bit deceiving. Because DelLayer does not actually delete the Layer itself. But instead with these few lines of code it added the ability to delete all the objects on a given Layer. With each release of AutoCAD starting with version 2.6 to R12 the DelLayer.lsp grew not only in the number of lines of code but also in added function. Though the code still fell short of actually deleting the Layer itself, the R12 version of the code finally prepared the groundwork for the Layer to be deleted or purged. It also added support to delete objects on the given Layer both in Model Space and Paper Space (see Figure 2). Then for some reason in both AutoCAD R13 and R14 this free sample code completely disappeared from the shipped package. It wasn’t until AutoCAD 2000 augi.com


Turn static files into dynamic content formats.

Create a flipbook
AW202508hr by AUGI, Inc. - Issuu