Sorry, I'm newbie.
I just want to erase some object (viewport) in Specific Area at Several Layout. Every layout actually have the same position of object.
When this script work, I will make the (repeat n) version....
(defun c:xxxx ()
(setq p1 (getpoint "\np1: "))
(setq p2 (getpoint "\np2: "))
(setq seleksi (ssget "C" p1 p2))
(setvar 'ctab (car (layoutlist))) ; move to first layout
(command "erase" seleksi "")
(command "rectangle" p1 p2 "")
(setvar 'ctab (cadr (member (getvar 'ctab)(layoutlist)))) ; next layout
(command "erase" seleksi "")
(command "rectangle" p1 p2 "")
(setvar 'ctab (cadr (member (getvar 'ctab)(layoutlist))))
(command "erase" seleksi "")
(command "rectangle" p1 p2 "")
(setvar 'ctab (cadr (member (getvar 'ctab)(layoutlist))))
(command "erase" seleksi "")
(command "rectangle" p1 p2 "")
(setvar 'ctab (cadr (member (getvar 'ctab)(layoutlist))))
)
The problem is: for example, the active layout is the 3rd layout, and then I run this script.
It will only erase the object in the 3rd layout. But, it success to make rectangle in every layout...
I have no idea why this can happen. Thx in advance.