How do you rotate a viewport?
Thank you very much.
|
|
|
Michael "MP" Patrick
"I only drink :coffee: until it's acceptable to drink :beer: or :whiskey: or :wine:"
I use DVIEW => All => TWist
The viewport has to be active. You will need to input the rotation you would like at this point. Just follow the remaining prompts.
I haven't heard of the MVsetup before. I tried it and both have about the same number of steps.
Just another option.
Michael "MP" Patrick
"I only drink :coffee: until it's acceptable to drink :beer: or :whiskey: or :wine:"
Both of the solutions given are good answers, either will work. If you want to know what those commands are doing in the background, so to speak, read on.
You can accomplish the same objective by manipulating the UCS and then use the Plan command. So, you start by using UCS, Z, 90. Plan, Current.
The 90 is for rotating the "view" 90 degrees, plug in any other value for other angles. Don't know the angle?, then use UCS, Object, pick an object to align to, or UCS, 3, then pick three points, the first and second points will describe the X axis, the third point will describe the Y axis.
Again, after using those methods, invoke Plan, C, and you have the same results as the other methods.
If you know you will simply need to rotate the view 90 degrees often, then it is easy enough to write a simple macro or lisp routine for
UCS;Z;90;;PLAN;C;
I select an entity I want to be the new positive x-axis, and use UCS, E (entity) option, then plan. Another method is UCS, 3P (3 point), where you define a new origin, and positive x and y axes.
I have a routine I wrote for creating views around a plan for creating building sections and elevations, it does what's been described, rotates the usc, sets the plan view, zooms extents and names the view. It does this on all four sides of the plan, then you simply restore that named view ("front", "right", "back" and "left") while in model space or through a viewport.
Hope it helps, it's been made part of our standard procedures.Code:;;;;MAKE-VIEWS.lsp by Ted G. ;;;Makes four views around a plan View for projecting geometry ;;;to create Building Elevations and Sections ;;;It's assumed the "front" of the building is at the bottom of the plan ;;;while in the world coordinate system. (defun c:4v () (command "ucs" "w" "plan" "") (command "zoom" "e" "zoom" ".9x") (command "-view" "save" "FRONT") (command "ucs" "z" "90" "plan" "current") (command "zoom" "e" "zoom" ".9x") (command "-view" "save" "RIGHT") (command "ucs" "z" "90" "plan" "current") (command "zoom" "e" "zoom" ".9x") (command "-view" "save" "BACK") (command "ucs" "z" "90" "plan" "current") (command "zoom" "e" "zoom" ".9x") (command "-view" "save" "LEFT") (command "-view" "restore" "FRONT") (princ)) (princ " MAKE-VIEWS loaded") (princ ", type: 4V")
I'm sorry, that was clear as mud wasn't it?
You were asking "how to rotate a view port" right?
One of the procedures you were given was rotating the ucs to some angle you choose, and setting the "plan" current: (see kent.elrod's post).
Anyway, my lisp routine does what kent.elrod's post explains, it does it four times and names the views too so you can restore them later.
To answer your question, you can "rotate the viewport" one of two way using this method.
1. You can activate the viewport (go into modelspace through the viewport) and run a simple command string: ("ucs" "z" <your desired angle> "plan" "current") and then pan and zoom for your desired viewport scale.
2. You can be in either modelspace or in paperspace through a view port, use the command above, and type "view" and "save" this view (which is what my routine does) and then through the active viewport, restore your desired view, pan and zoom for your desired viewport scale.
Does that help explain it better?
Just to let you know, in this command string ("ucs" "z" <your desired angle> "plan" "current") you're rotating the ucs about the "z" axis (the one coming at you) you can also rotate it about the x or y axis too, great for 3d work.
Good luck
Last edited by tedg; 2007-08-29 at 01:13 PM.