Try this at the command prompt:
then pick the port. From what you get:
1 = On,
but is fully off screen, or is one of the viewports that is not active
because the $MAXACTVP count is currently being exceeded.
0 = Off
= On and active.
The value indicates the order of stacking for the viewports, where 1 is the
active viewport, 2 is the next, and so forth.
I got the impression that the OP was asking about the layer status of a
viewport, rather than its on/off status. The layers that are frozen in a
particular viewport are listed in the viewport's *extended* data (DXF
code -3). It's there, but it takes a bit of drilling down to get to it:
(setq v2 (car (entsel))) ;;pick the viewport
(setq frz (cdadr (assoc -3 (entget v2 (list "acad")))))
...and frz will contain the viewport's extended data, with each frozen
viewport as the argument of a different "1003" code group.
To get a comma-delimited list of the frozen viewports, use:
(setq flist "")
(foreach n frz
(if (= (car n) 1003)
(setq L1 (cdr n)
flist (strcat flist L1 ", "))
Any layer not contained in flist is thawed in the selected viewport.
i've been searching for this during last week !
They are many things that don't work around this viewports :
You can restore this from the layer state manager, but only from the
if you try using the command line, it doesn't work.
So i finaly read a *.las file, using the 90 code :
off : 1
frozen : 2
unprintable : 8
frozen in new : 16
frozen in current : 32
but reading it directly from a viewport is better ...
Upon further review....it appears you may be right.
Now I have a question. What's the relationship of this extended data to the
usual ent data? A simple call to (entget(car(entsel))) reveals no list
member associated with -3, yet your code below reveals what you say it will.
How's that work?
Extended data is applied to a number of objects (like viewports) by using
one or more "application" fields in the -3 code group. In this case, it's
added by AutoCAD itself, hence (list "acad"). Third-party apps may also add
extended data, however it isn't common.
The standard (entget ent) function gets only the basic data. To read
extended data, if any, the form
(entget ent '(""))
(entget ent (list "