PURGING BLOCKS WITHOUT ECHO

Discussion in 'AutoCAD' started by Rolf Rosenquist, Nov 16, 2004.

  1. Dear Friends!

    I've asked this before but haven't succeded doing it in VLISP.

    I want to purge blocks without that it echoes that the block is purged.
    Someone gave me the followong for deleting layers:

    (defun DeleteLayer (Name / Ename)
    (and (= (type Name) 'STR)
    (setq Ename
    (tblobjname "layer" Name)
    ;;; (tblobjname "block" Name)
    )
    (not (vl-catch-all-apply 'vla-delete (list (vlax-ename->vla-object
    Ename))))
    )
    )

    I thought I could use that defun for deleting blocks too, but not!

    Could someone give me some hints.

    Rolf
     
    Rolf Rosenquist, Nov 16, 2004
    #1
  2. Rolf Rosenquist

    LUCAS Guest

    ;;Make sure no blkref
    (defun DELETEBLOCK (NAME)
    (if
    (and (= (type NAME) 'STR)
    (not
    (vl-catch-all-apply
    'vla-delete
    (list
    (vl-catch-all-apply
    'vla-item
    (list (vla-get-blocks
    (vla-get-activedocument (vlax-get-acad-object))
    )
    NAME
    )
    )
    )
    )
    )
    )
    t
    )
    )
     
    LUCAS, Nov 17, 2004
    #2
  3. Rolf Rosenquist

    John Uhden Guest

    With all due respect, I don't think you want to do that.

    A layout is a block. Dimension styles rely on arrow block definitions being
    defined.

    You might want to delve back into a thread entitled "Purge block group code 70"
    c.Jan 2002.
     
    John Uhden, Nov 17, 2004
    #3
  4. I have this built into my custom lsp file. I ttype PME and hit the enter key
    3 or 4 times.

    (DEFUN C:pME () (COMMAND "._PURGE" "ALL" "" "N")(PRINC))
     
    Kevin R. Knox, Nov 17, 2004
    #4
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.