Hacktober WINNER - Produce cleanly closed drawings with this command by

Thank you to everyone who submitted entries into our Hactober competition last month. A2K is happy to announce Danial Nash from Greenbox Architecture as one of our winners. See Danial's handy AutoCAD command to produce closed drawings.


1. CUI

2. Create new command: ^C^C^P-LAYER;THAW;*;ON;*;s;0;;tilemode;1;z;ex;-purge;A;*;N;-purge;R;*;N;tilemode;0;z;ex;close;

3. Choose button image

4. Fill in the command property details as shown and add the macro line text

5. Apply

6. Go back to top left window in CUI ‘All Customisation Files’ and select toolbars

7. Add your new ‘exit’ button to toolbar of your choice or create a new one (drag and drop)

8. Then recommend saving the toolbar via the Transfer tab so other users can simply transfer the icon from a main server location

A cleanly closed drawing helps in several ways:

  • Reduce file size means less storage demand, faster load and startup times, better running

  • Zoom extents preserves a full view thumbnail of the drawing for open dialog box browsing

  • The ‘all thaw’ line was added to this script to aid another workflow we have: all views are controlled by paperspace viewports, which require the modelspace to have all layer on / thawed. View is controlled in model space by saved LAYERSTATEs (another custom icon script created to use LMAN / LAYERSTATE to quickly switch from Furntiture to Partition views eg. While working in modelspace).

  • The scripts saves us on average 2 minutes for each save / exit. Add this up over multiple users several times a day – it’s a big saving!

Subscribe to our newsletter on the home page and receive more of these tips and tricks.