[Search tip detail and code files using keywords, tip number, author name, etc ]
 
    For tip to function correctly, you must ensure that the downloaded file name matches the file name
    displayed in the Rename File To field. Please rename downloaded files when necessary.
Rotate View in Paper Space
Tip# 3108 By Swaraj Baral On 12-Jan-2009
4
Rated By 1 users Downloaded : 682
Categories : Tips & Tools Weekly Archive Tips
Software type : AutoCAD 2008
Rename File To : Rotate_view.LSP,Rotate_view_Modified.LSP
Rotate your view in paper space without affecting your UCS in model space.

Swaraj Baral sent ROTATE_VIEW.LSP, an AutoLISP routine to rotate your view in paper space without affecting your UCS in model space. He uses AutoCAD 2008 and says the program will work with all versions of AutoCAD after R14.

NOTES FROM CADALYST TIP PATROL: This is a great tip! Just make sure the viewport selected for rotation is unlocked. If the drawing has multiple viewports, select the one being rotated before executing the command. The Tip Patrol offers ROTATE_VIEW_MODIFIED.LSP, a modified version of this routine that automatically unlocks all locked viewports.

Follow-Up: Rotate View in Paper Space
In another follow-up tip, Mats Ericsson wrote to say he uses Dview / Twist to rotate views in paper space.

Our September 15 tip inspired a few follow-ups from readers. Dave Hein wrote, "I also use Mvsetup in paper space to rotate views without affecting the UCS, but I also have to work between a full version of AutoCAD 2008 in my office and AutoCAD LT 2008 at home where the Mvsetup command is (still) not available. So I have created prerotated paper space layout templates for those times when I need a rotated view over the weekend."

Shawn Evjen wrote, "In AutoCAD 2000, 2008, and 2009, and Architectural Desktop 3.3, I like the UCS to be rotated to the screen so that my arrays work properly. I have two routines I use, one to rotate the UCS and plan in model space or a paper space view. These are “2rt” for two-point rotate, and “world” to reset them. The “2rt” command asks for a base point and the X-direction. You can align the view to any line by selecting points along the line, or leave the default at 0,0.

    ;; 2RT - Rotate Screen using UCS 3 point command (Y is calculated)
    (defun c:2rt(/ org xdir ydir osm)
    (setq org (getpoint " Enter point of Origin <0,0>: "))
    (if (or (= org "")(= org nil))
    (setq org (list 0 0 0)))
    (setq xdir (getpoint org " Enter X direction: "))
    (if (and (or (= xdir "")(= xdir nil)) (equal org (list 0 0 0)))
    (command "ucs" "world" "plan" "")
    (progn
    (setq ydir (polar org (+ (/ pi 2.0)(angle org xdir)) (distance org xdir)))
    ;(setq ydir (getpoint org " Enter Y direction: "))
    (setq osm (getvar "osmode"))
    (if (
    (setvar "osmode" (+ 16384 osm)) )
    (command "ucs" "3point" org xdir ydir "plan" "")
    (setvar "osmode" osm)))
    (princ)
    )
    ;; WORLD - Reset Screen to world coordinates
    (defun c:world()
    (command "ucs" "world")
    (command "plan" "world")
    (princ)
    )

"I would also replace the line (setq a1 (* a1 57.29578)) with (setq a1 (/ (* a1 180) pi)) because if you use the command five or six times, some of your lines will get skewed and not be true to ortho. At least that is the experience I had when testing my routines."

We received this from Sally A. Higgins: "I use paper space for plot setup with my title block only. All drawing is done in model space and then xrefed into the drawing containing the title block. The tabs are then set as needed for site, erosion, utility, etc., viewports. I also use the Dynamic View (DV) command with the Layer Manager. I've never used the Locked command and never had a problem as Layer Manager holds the view/windows. DV also does not affect the original model space UCS. In paper space, toggle (floating) model space. Type DV and select all or window all; use T choice to rotate to desired position, then X to exit. Check the window model scale to be sure it is still to scale; in some cases you may have had to zoom out to get all of the drawing. Now save the layer view with the Layer Manager. Note: This is not an actual rotate, so it does not affect your UCS in model space.

"In AutoCAD 2009, you have to be in floating model space to save the view. When layers are set as you want them, save the view using the Layer Manager icon. It will hold all your settings with no freezing needed. This allows me to move through my tabs with no unfreeze/freeze slowdowns. All my work is actually done in the model space mode, so I have no fear of losing or moving a viewport setting. And if I do, a simple reset at the Layer Manager brings the saved view back. Once the window view is saved in Layer Manager, there is no reason to return to paper space until it is time to plot.

"On long curving roads, where it is required to hold the road as close as possible to horizontal with the bottom of the sheet, this is a very fast and easy way to set up your sheets: Hold model space at the original UCS and rotate all views to save plot views with very little fuss."
 

 

Average Rating:
4


User comments