Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Delete Layouts - Explode All - Purge - Audit

0 REPLIES 0
Reply
Message 1 of 1
smaher12
298 Views, 0 Replies

Delete Layouts - Explode All - Purge - Audit

I am playing around with vlisp and was wondering if anyone may have a better suggestion for the following. I feel like it can be condensed a little more.  Especially in the (vla-get-activedocument (vlax-get-acad-object)) area.

 

 

  (vl-load-com)
  (vlax-for layout
    (vla-get-layouts
      (vla-get-activedocument (vlax-get-acad-object))
    )
    (if (/= (vla-get-name layout) "model")
      (vla-delete layout)
    )
  )

  (setvar "qaflags" 1)
    (repeat 3
        (vl-cmdf "explode" (ssget "x") "")
    )
  (setvar "qaflags" 0)

  (setq $doc (vla-get-activedocument (vlax-get-acad-object)))
  (setq aud (vla-auditinfo $doc t))
    (repeat 3
        (vla-purgeall $doc)
        aud
    )
 (princ)
)

0 REPLIES 0

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk Design & Make Report

”Boost