AfraLisp Blog

The AutoLisp/Visual Lisp/VBA Resource Website

AfraLisp Blog

Home Newsletter Utter Rubbish Coding Tips AutoCAD Tips Contact Downloads WAUN

This will erase everything except xrefs, active layer, active style, etc....

Public Sub EraseAll(Doc As AcadDocument)
Dim Entity As AcadEntity
Dim Layout As AcadLayout

For Each Layout In Doc.Layouts
For Each Entity In Layout.Block
Entity.Delete
Next
Next

Call Doc.PurgeAll

Set Entity = Nothing
Set Layout = Nothing

End Sub

The AutoLisp/Visual Lisp/VBA Resource Website

Copyright © 1999-Perpetuity by AfraLisp

All rights reserved.
Information in this document is subject to change without notice.
Site created and maintained by Kenny Ramage

The AutoLisp/Visual Lisp/VBA Resource Website