AutoLISP: ATTWIPE Clear Selected Attribute Values

Here is one that lets you easily clear the selected attribute tag(s).

This is especially helpful for when you are editing titleblocks that have populated attributes or when you copy a block (symbol) that already has attribute values already populated.

Here’s how:

(After loading of coarse)

  • ATTWIPE [enter]
  • Select the individual attributes that you would like to clear…
  • hit [enter] when finished to end the routine



;; ------------------------------------------------------------------------------
;; AttWipe - © 2005 by Chuck Chauvin
;; Posted at:;all
;; Clears (wipes) the value of a selected attribute
;; ------------------------------------------------------------------------------
(defun C:AttWipe (/ AttSel AttLoc)
  (defun *error* (msg)
    (princ "\nInvalid selection.")
  );_ end defun *error*

  (defun SelectIt (msg)
  (setq AttLoc (cadr (setq AttSel (entsel (strcat "\nPick " msg " to wipe: ")))))
    );_ end defun SelectIt

  (defun WipeIt (/)
    (command "-attedit" "y" "" "" "" AttLoc "" "v" "r" "" "n")
    );_ end defun WipeIt

  (setvar "cmdecho" 0)
  (SelectIt "attribute")
  (while AttSel
    (SelectIt "next attribute")
    (if	(= (type AttSel) 'list)
      (setq AttSel nil)
      ) ;_ end if
    ) ;_ end while
  );_ end defun AttWipe
;; ------------------------------------------------------------------------------

About AutoCAD Tips

This blog serves as a knowledge base for myself (and anyone else) so that I can reference tips & tricks that I have learned and also refer others to it as well. I hope that this blog helps you learn at least one tip to make your drafting/design experience better.
This entry was posted in Attributes, AutoLISP, AutoLISP: Attributes, Blocks, Modifying. Bookmark the permalink.

1 Response to AutoLISP: ATTWIPE Clear Selected Attribute Values

  1. james says:

    This works great for regular text attributes. Can it be reworked to include multiline attributes as well?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s