Set View To All Layouts

Set View To All Layouts

wispoxy
Advisor Advisor
979 Views
5 Replies
Message 1 of 6

Set View To All Layouts

wispoxy
Advisor
Advisor

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

0 Likes
Accepted solutions (1)
980 Views
5 Replies
Replies (5)
Message 2 of 6

Ranjit_Singh
Advisor
Advisor
Accepted solution

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))

 

0 Likes
Message 3 of 6

wispoxy
Advisor
Advisor

I'll test it out and share results.

0 Likes
Message 4 of 6

rkmcswain
Mentor
Mentor

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
Advisor
Advisor

Exactly what I needed. Thank you so much.  🙂

0 Likes
Message 6 of 6

Ranjit_Singh
Advisor
Advisor

You are welcome Smiley Very Happy

0 Likes