MJLM Posted April 3, 2017 Posted April 3, 2017 (edited) Through a lisp macro I often change from view to view (say from top to SW Isometric) quickly. However the problem is that the new view resets always to 'zoom' 'extents' mode and that means I need to zoom in manually every time I change view. Would it be possible to change from view to view keeping the same view size base on the center point of the current view instead of always going zoom extents? Thank you. Edited April 4, 2017 by MJLM Quote
SLW210 Posted April 3, 2017 Posted April 3, 2017 The only way I know of is to set the viewcube settings not to zoom>extents and use the viewcube. You can also use the 3D Orbit I believe. Maybe someone has a LISP, but, I never found one of those myself. Quote
MJLM Posted April 4, 2017 Author Posted April 4, 2017 Thank you for your help but 3d orbit will never give me sharp orthogonal or isometric views while zoom without extents in view cube settings is still no go as it rotates the view in such way that the portion I m looking at comes again out of screen, well at least in a large model as the one I am working on. I managed to do it this way which is kinda sloppy but at least it's better that anything else I tried. (defun c:sw (/ cp wcp1 wcp2 ss) (setq cp (getvar "viewctr")) (setq wcp1 (list (- (car cp) 5) (- (cadr cp) 5) (caddr cp))) (setq wcp2 (list (+ (car cp) 5) (+ (cadr cp) 5) (caddr cp))) (setq ss (ssget "_C" wcp1 wcp2)) (command "_.view" "sw") (command "_.zoom" "O" ss "") (princ) ) Quote
SLW210 Posted April 4, 2017 Posted April 4, 2017 Maybe a good use of named views. Yes, I know Zoom Extents can be a big pain in the rear when switching views, I have no idea why this can't be turned off. Quote
tombu Posted April 4, 2017 Posted April 4, 2017 In Options on the 3D Modeling tab click [ViewCube…] button and uncheck "Zoom to extents after view change" or right-click on the viewcube and select "viewcube options" to get to the setting quicker. Quote
rkent Posted April 4, 2017 Posted April 4, 2017 Maybe a good use of named views. Yes, I know Zoom Extents can be a big pain in the rear when switching views, I have no idea why this can't be turned off. Named views is my suggestion as well, some simple automation can make it very easy to use. Quote
tombu Posted April 4, 2017 Posted April 4, 2017 Through a lisp macro I often change from view to view (say from top to SW Isometric) quickly. However the problem is that the new view resets always to 'zoom' 'extents' mode and that means I need to zoom in manually every time I change view. Would it be possible to change from view to view keeping the same view size base on the center point of the current view instead of always going zoom extents? Thank you. Cadalyst tip 3D View Assistant ViewsNoZoom.lsp by Kent Cooper provides an example of what you're looking for. My previous post only prevents it from happening using ViewCube. Quote
marko_ribar Posted April 6, 2017 Posted April 6, 2017 Hi, I have developed Kent Cooper's code further - there was one omission of view in Kent's code and I added additional views... The main point of this my revision is addition of new main function (c:vv) which will bring into focus new navcube in center of current view on which you can just pick point for desired view - no need to remember all those command functions which Kent coded... Only lack is the fact that it uses "isolateobjects" command which was introduced in A2011 and for best usage make sure your ACAD also supports "3dosnap" - can't remember was it in A2010, A2011 or A2012... Try it and I think you won't regret as I think now it's more powerful and I think it could be very useful on complex drawings where you are working on detail and want to switch to some other isometric or orthographic view quickly... HTH., Regards, M.R. ViewsNoZoom.zip Quote
Dadgad Posted April 6, 2017 Posted April 6, 2017 Nicely done Marko (and Kent Cooper), thanks, that's a keeper! Quote
marko_ribar Posted April 6, 2017 Posted April 6, 2017 Thanks Dadgad, however there is one small mistake - in the code there was 2 times defined command function (C:VISWZ) - the second one under first should be (C:VISEZ)... Here is that portion of the code - I won't reattach file as it's simple mistake that everyone can correct... Hope that everything else is fine, but we will have to see if someone finds something I missed - so please report that... (defun C:VIS[color=blue][b]W[/b][/color]Z (); = View: Isometric from SouthWest, Zero elevation (ViewPredef "@-1,-1,0") ); end defun (defun C:VISWU (); = View: Isometric from SouthWest, Underneath (ViewPredef "@-1,-1,-1") ); end defun (defun C:VISEO (); = View: Isometric from SouthEast, Overhead (ViewPredef "@1,-1,1") ); end defun (defun C:VIS[color=red][b]E[/b][/color]Z (); = View: Isometric from SouthEast, Zero elevation (ViewPredef "@1,-1,0") ); end defun Regards, and I hope you'll find it useful as I did... M.R. Quote
marko_ribar Posted April 11, 2017 Posted April 11, 2017 Update - ViewsNoZoom.lsp Look into attachment... Regards, M.R. ViewsNoZoom.lsp Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.