TheSwamp
CAD Forums => CAD General => Topic started by: Andrea on March 16, 2006, 02:16:13 PM
-
Hi all...
in a drawing...
it alway zoom extend when changing layout...
is there any variable to set for this ?
also, it regen the drawing each time....even the variable regenauto set to off.
:|
-
Try setting "ucsfollow" to 0 in all layouts.
-
Try setting "ucsfollow" to 0 in all layouts.
wow...
thanks T.Willy..
did the job.
:roll:
-
You're welcome. That happened to me once in like three or four viewports. That was the worst. Filed that one away.
-
Just a little more thing...
this is happen also if we are in TILEMODE 0
when trying to enter in a no-locked Mview...
it zoom extent the Vport each time..
is there another variable for this ?
:?
-
I don't have time to explain the following, and I apologize for that, but I wrote this quick and dirty several years ago at the request of my users, and they expressed much gratitude.
(defun c:UCSClassic ( / _ForEachVP _DoIt _Main )
(defun _ForEachVP (quoted_task / vps)
(setq vps
(apply 'append
(mapcar
'(lambda (x / v) (if (/= 1 (setq v (car x))) (list v)))
(reverse (vports))
)
)
)
(if (eq 0 (getvar "tilemode"))
(cond
( (eq 1 (getvar "cvport"))
(cond
( vps
(command ".mspace")
(_ForEachVp quoted_task)
(command ".pspace")
)
)
)
(
(foreach x vps
(setvar "cvport" x)
(eval quoted_task)
)
)
)
(foreach x vps
(setvar "cvport" x)
(eval quoted_task)
)
)
)
(defun _DoIt ( / tilemode )
(foreach x
'("ucsortho" "ucsview" "ucsfollow" "ucsvp")
(setvar x 0)
)
(_ForEachVP '(setvar "ucsvp" 0))
(princ "\nUCSORTHO has been set to 0.")
(princ "\nUCSVIEW has been set to 0.")
(princ "\nUCSFOLLOW has been set to 0.")
(princ
(strcat
"\nFor TILEMODE = "
(itoa (setq tilemode (getvar "tilemode")))
" UCSVP set to 0 (off) for each active viewport."
)
)
(princ
(strcat
"\nFor TILEMODE = "
(itoa (abs (1- tilemode)))
" UCSVP remains unaltered for each viewport."
)
)
)
(defun _Main ( / cmdecho )
(setq cmdecho (getvar "cmdecho"))
(setvar "cmdecho" 0)
(if (zerop (getvar "tilemode"))
(cond
( (eq 1 (getvar "cvport"))
(command ".zoom" "_extents")
(command ".mspace")
(_DoIt)
(command ".pspace")
(command ".zoom" "_previous")
)
( t
(command ".pspace")
(command ".zoom" "_extents")
(_DoIt)
(command ".zoom" "_previous")
(command ".mspace")
)
)
(_DoIt)
)
(setvar "cmdecho" cmdecho)
(princ)
)
(_Main)
)
Have fun.
:)
-
That is what was happening to me. Best thing to do is either
Lock the viewport
Make the vp active
setq ucsfollow to 0
exit the vp
unlock the vp
Or like Michael's code
Make the vp active
set ucsfollow to 0
zoom previous
exit the vp