For locking viewports I am using these lines in a script:
(foreach tab (layoutlist) (setvar 'CTAB tab)
(command "-VPORTS" "L" "ON" "ALL" ""))
but the viewports having the layer frozen cannot be selected with "ALL".
How can I complete the code so the viewports having the layer frozen to be in the selection and to be locked?
.....
I think I solve it:
(foreach tab (layoutlist) (setvar 'CTAB tab)
(if (setq vp (ssget "X" (list '(0 . "VIEWPORT") (cons 410 (getvar "CTAB")))))(command "-VPORTS" "L" "ON" vp "")))