There are times when sending or submitting drawings to client or another drafter when the blocks in your drawings contain many attributes – some of which may be set to Invisible. And if you have ever wanted to delete invisible attributes, this routine is for you.
Warning: this does not work when trying to delete ALL attributes even if they are all set to invisible. At least one attribute has to be set to visible for this routine to work.
In case you are wondering how to set Attribute Visibility:
When creating an attribute you can toggle the visibility (as seen below)
Or when using the BATTMAN command you can edit which attributes are visible or invisible (seen below)
Another LISP routine [found here] allows you to select different instances of a block and toggle the visibility. Note: the DIA.lsp routine uses the command ATTSYNC which will synchronize all instances of a block based on the one you select.
- DIA <enter> to start
- Type in the name of the block <enter>
;;; By Lee-Mac http://www.theswamp.org/index.php?topic=36280.0 (defun delInvisAtts ( bname ) (vl-load-com) (if (tblsearch "BLOCK" bname) (vlax-for obj (vla-item (vla-get-blocks (vla-get-activedocument (vlax-get-acad-object)) ) bname ) (if (and (eq (vla-get-objectname obj) "AcDbAttributeDefinition") (eq (vla-get-invisible obj) :vlax-true) ) (vla-delete obj) ) ) ) ) (defun c:DIA ( / bn ) (delInvisAtts (setq bn (getstring t "\nBlock Name: "))) (vl-cmdf "_.attsync" "_N" bn) (princ) )