To find all of them [assuming what you're referring to is their Style name, not the Font assigned to their Style(s)]:
(setq ss (ssget "_X" '((0 . "*TEXT") (7 . "ARCHSTYL"))))
To make them invisible:
(repeat (setq n (sslength ss)) (vla-put-Visible (vlax-ename->vla-object (ssname ss (setq n (1- n)))) 0))
To make them visible again:
(repeat (setq n (sslength ss)) (vla-put-Visible (vlax-ename->vla-object (ssname ss (setq n (1- n)))) -1))
One benefit of this approach, as opposed to HIDEOBJECTS, is that if you happen to also have reason to hide any other objects than the Text you want hidden for this purpose, then when you UNHIDE, all of those other things will also come back on.
It could make sense to combine them into one command name, which could be built to toggle visibility [EDIT: see below], or one function name with some kind of tag argument for whether you want to hide or show them.
But personally, I would take the trouble to set up a different Layer for the room labels -- I expect you'd find it has benefits beyond just making it easier to do this kind of thing.
EDIT: A simple Toggler command:
(defun C:TAV (/ ss vis); = Toggle ARCHSTYL Visibility
(if (setq ss (ssget "_X" '((0 . "*TEXT") (7 . "ARCHSTYL"))))
(progn
(setq vis (vlax-get (vlax-ename->vla-object (ssname ss 0)) 'Visible))
(repeat (setq n (sslength ss))
(vla-put-Visible
(vlax-ename->vla-object (ssname ss (setq n (1- n))))
(if (= vis 0) -1 0)
)
)
)
)
)
... but @dbroad's point about the other related things remaining visible is a very good one [one of those "benefits beyond" that I expected there would be]....
Kent Cooper, AIA