Another simple but sweet routine. Sure this can be done through the command BATTMAN but this LISP routine saves clicks and picks… You simply select the blocks that contain attributes that you want to toggle on or off.
- AVT <enter> to start Attribute Visibility Toggle
- Make a selection set of blocks that have attributes
- <enter> when finished selecting
Seen Below is toggling the attributes off:
Seen below is toggling some attributes on:
;;; Attribute Visibility Toggle By Alan Thompson ;;; make a selection set of blocks with Atts and then hit <enter> ;;; This will toggle them either on or off (defun c:AVT (/ ss i) (vl-load-com) (if (setq ss (ssget "_:L" '((0 . "INSERT") (66 . 1)))) (repeat (setq i (sslength ss)) (foreach a (vlax-invoke (vlax-ename->vla-object (ssname ss (setq i (1- i)))) 'GetAttributes) (vlax-put a 'Visible (~ (vlax-get a 'Visible))) ) ) ) (princ) )