Select All The Viewports in the drawing

Select All The Viewports in the drawing

richie_hodgson
Collaborator Collaborator
1,217 Views
1 Reply
Message 1 of 2

Select All The Viewports in the drawing

richie_hodgson
Collaborator
Collaborator

Hi

 

I am wanting to achieve something like

 

( defun c:Template ()
 (setq vpall (ssget "x" '((0 . "VIEWPORT"))))
 (command "vplayer" "c" "1" "*E-Water,*E-Water Lateral,*E-Stormwater,*E-Sewer" "s" vpall "" "" )
)

 

but for all the viewports on each tab.

 

I can get it to cycle through each tab with a while statement but i was wondering if the vplayer command can work from a single search instead.

If i need to do the while option I know  I can achieve the same with

 

(command "vplayer" "c" "1" "*E-Water,*E-Water Lateral,*E-Stormwater,*E-Sewer" "a" "" )

 

Richie
0 Likes
Accepted solutions (1)
1,218 Views
1 Reply
Reply (1)
Message 2 of 2

richie_hodgson
Collaborator
Collaborator
Accepted solution

Short and sweet does it for me.

 

(defun c:VPTEMP
  (foreach x (layoutlist )
   (setvar 'ctab x)
    (command "vplayer" "c" "1" "*E-Water,*E-Water Lateral,*E-Stormwater,*E-Sewer" "a" "" )
   )
)

Richie
0 Likes