Batch delete of entities

Discussion in 'AutoCAD' started by russgreen, Jul 6, 2003.

  1. russgreen

    russgreen Guest

    Hi

    I need to process several hundred drawings. All were blocks in another CAD package. they are now exploded and exist in a subdirectory as wblocks. in each drawing there is a redundant attribute definition that needs to be deleted. The following shows my attempt at a lisp routine to do this but it just isn't working.

    Can someone please point me in the right direction?

    thanks

    russ

    ;----------delete entities based on a given filter of entity type----------

    (defun C:del_filter ()
    (setq mycmdecho (getvar "CMDECHO"))
      (setvar "CMDECHO" 0)

    (ssget "x" (list (cons 0 "ATTDEF")))
    (entdel (entlast))

    (setvar "CMDECHO" mycmdecho)
      (princ)
    )

    ; ------------------------------eof del_filter.lsp-------------------------
     
    russgreen, Jul 6, 2003
    #1
Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.