Hello
I am having a terrible time with toggling invisible/visible attributes.
The attributes sometimes come out of sync with each other and I often loose the ability to use the grips (acad2004).
Anyway CAB (I think) kindly wrote this lisp which seems quite bullet proof:
(defun c:testOFF (/ ss idx ename att)
(and
(setq ss (ssget '((0 . "INSERT") (66 . 1))))
(setq idx -1)
(while (setq ename (ssname ss (setq idx (1+ idx))))
(foreach att (vlax-invoke (vlax-ename->vla-object ename) 'getattributes)
(if (member (vla-get-tagstring att) '("NO" "CODE"))
(vla-put-Invisible att :vlax-true)
)
)
)
)
(princ)
)
And I have modified it to now turn the attributes visible again (vla-put-Invisible att :vlax-false)
How can i modify this, so that instead of asking me to select objects it automatically selects all objects within model space?
I'd also like to modify it so that it toggles between the two, what variable can i use to enable this? The attmode variable in this case doesn't change.
Thanks
Patrick