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

Set View To All Layouts

5 REPLIES 5
SOLVED
Reply
Message 1 of 6
wispoxy
908 Views, 5 Replies

Set View To All Layouts

I need a lisp to put into my Startup Suite that will set views to all (paperspace) layouts, see image. Thanks.

 

AutoCAD 2017

 

Layout Center View.PNG

5 REPLIES 5
Message 2 of 6
Ranjit_Singh2
in reply to: wispoxy

The height and width of your view will depend on several factors and would not be exactly 3'-3" and 6'-1". For instance, where is you property window located, what size it is, how big is the prompt line etc. You can however set the center and the zoom extents.

(defun c:somefunc ( / )
(command "._zoom" '(-16.5 32.5 0.0) '(56.5 -6.5 0.0)))

 

 

EDITED: For all layouts

(defun c:somefunc ( / curtab)
(setq curtab (getvar 'ctab))
(foreach i (layoutlist)
(setvar 'ctab i)
(command "._zoom" '(-16.5 32.5 0.0) '(56.5 -6.5 0.0)))
(setvar 'ctab curtab))

 

Message 3 of 6
wispoxy
in reply to: Ranjit_Singh2

I'll test it out and share results.

Message 4 of 6
rkmcswain
in reply to: wispoxy

This should get you started.

 

(vl-cmdf "._Zoom" "_C" "20,13" "39")

 

zoom88.gif

R.K. McSwain     | CADpanacea | on twitter
Message 5 of 6
wispoxy
in reply to: Ranjit_Singh2

Exactly what I needed. Thank you so much.  🙂

Message 6 of 6
Ranjit_Singh2
in reply to: wispoxy

You are welcome Smiley Very Happy

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