Visual LISP, AutoLISP and General Customization
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Select All The Viewports in the drawing

1 REPLY 1
SOLVED
Reply
Message 1 of 2
richie_hodgson
1165 Views, 1 Reply

Select All The Viewports in the drawing

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
1 REPLY 1
Message 2 of 2

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

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

AutoCAD Inside the Factory


Autodesk Design & Make Report