Visual LISP, AutoLISP and General Customization

Visual LISP, AutoLISP and General Customization

Reply
Mentor
smaher12
Posts: 173
Registered: ‎11-20-2011
Message 1 of 1 (143 Views)

Delete Layouts - Explode All - Purge - Audit

143 Views, 0 Replies
02-04-2013 11:30 AM

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)
)

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community