PurgeAll Method (ActiveX)

Removes unused named references such as unused blocks or layers from the document.

Supported platforms: Windows only

Signature

VBA:

object.PurgeAll
object

Type: Document

The object this method applies to.

Return Value (RetVal)

No return value.

Remarks

This method is the equivalent of entering purge at the Command prompt, selecting the All option, and then choosing Yes to the "Purge Everything?" prompt.

Deleted objects remain in the document until they are purged using this method.

Examples

VBA:

Sub Example_PurgeAll()
    ' This example removes all unused named references from the database
    
    ThisDrawing.PurgeAll
    
End Sub

Visual LISP:

(vl-load-com)
(defun c:Example_PurgeAll()
    ;; This example removes all unused named references from the database
    (setq acadObj (vlax-get-acad-object))
    (setq doc (vla-get-ActiveDocument acadObj))

    (vla-PurgeAll doc)
)