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.
Here’s how:
- AVT <enter> to start Attribute Visibility Toggle
- Make a selection set of blocks that have attributes
- <enter> when finished selecting
~enjoy
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) )
Great little lisp thanks for sharing as saved me so much time. Justin