hi i need something similiar
i need al pviewports entities as list instead of pviewports number, a list with all PViewports inside layout X.
the problem is remove the layout viewport from the list. (the 1- in your code)
i get it with ENTDEL, but this only works when layout X is active and need to run this lisp from model space, others methods has the same results.
the question is how can i get all PViewports inside layout X when model space is active