(defun c:hia ( / ent )
(while
(progn (setvar 'errno 0) (setq ent (car (nentsel "\nSelect attribute: ")))
(cond
( (= 7 (getvar 'errno))
(princ "\nMissed, try again.")
)
( (/= "ATTRIB" (cdr (assoc 0 (entget ent))))
(princ "\nSelected object is not an attribute.")
)
( (vla-put-invisible (vlax-ename->vla-object ent) :vlax-true))
)
)
)
(princ)
)
(defun c:showatts ( / ent )
(while
(progn (setvar 'errno 0) (setq ent (car (entsel "\nSelect block: ")))
(cond
( (= 7 (getvar 'errno))
(princ "\nMissed, try again.")
)
( (/= "INSERT" (cdr (assoc 0 (entget ent))))
(princ "\nSelected object is not a block.")
)
( (/= 1 (cdr (assoc 66 (entget ent))))
(princ "\nSelected block is not attributed.")
)
( (foreach att (vlax-invoke (vlax-ename->vla-object ent) 'getattributes)
(vla-put-invisible att :vlax-false)
)
)
)
)
)
(princ)
)
(vl-load-com) (princ)
(c:hia)

Advertisements