Thursday, October 21, 2010

Easy Zooming with Mouse Wheel

Recently, I was looking over the shoulder of one of my fellow "CADets" and saw her zooming using the window method in AutoCAD. I hadn't done that in quite some time and thought that maybe I needed to review.
Then, I remembered why I switched. Since the advent of the wheel-mouse, AutoCAD's window function has become very limited in use. Today, I just use the wheel. Here are a few tips about using AutoCAD's Zoom command via the wheel-mouse.
When you use the wheel on your mouse to zoom in AutoCAD, the focus of the zoom is where the cursor lies. Notice how the drawing shrinks and grows in conjunction with the wheel around the cursor arrow point. Combining this with the pan feature (holding down the wheel), you can conveniently navigate around the drawing as you desire.
As you turn the wheel, notice the feel of the notches as you zoom in and out. Observe this: Open any drawing. Place the cursor at the center of the screen. Roll the wheel backward one notch and then forward one notch. Notice that the view is now slightly smaller than it was before. Repeat this procedure and the view gets smaller and smaller.
Another feature I use quite frequently is the ZOOMFACTOR system variable. A small LISP routine (included as ZT.LSP below) toggles the variable from a factor of 65 (my default) to 5 (for fine-tuning). To understand the ZOOMFACTOR settings, just type Zoomfactor, enter different values from 3 to 100 and observe how it performs. (For convenience, I've set the right-click, Shift +Ctrl key combination on my menu file to execute this routine.) It's all a matter of what works best for the operator.
(defun c:zt (/ qt); Toggle Zoom Factor 5 - 65
  (setq qt (getvar "zoomfactor"))
   (if (/= qt 65)
      (setvar "zoomfactor" 65)
      (princ "\nZoom Factor = 65")
   (if (= qt 65) 
      (setvar "zoomfactor" 5)
      (princ "\nZoom Factor = 5")
Lastly, panning with the wheel provides different outcomes when used with the Shift key (orthogonal mode) or the Ctrl key (dynamic pan mode). In Windows XP, notice that panning doesn't stop when the cursor reaches the edge of the screen -- it continues past it. The Shift key must be held down constantly to maintain orthogonal mode, but the Control key can be released to maintain dynamic pan mode. I've also included a LISP routine (ZR.LSP) that performs a Zoom Extents, then backs off 5%. There's no reason for this -- it's just that some of us feel more comfortable with a little border space around the view. Both routines can be renamed so they don't conflict with your present naming conventions.
 (defun c:zr (); Zoom Room
  (command "zoom" "extents"
           "zoom" ".95x"

Autocad Side Button Mouse Customization for the OSNAP Menu

If you have a mouse with side buttons and would like to make one of these side buttons pop-up your OSNAP menu (instead of having to hold down the SHIFT key and right-click) try this:
First go to the Windows Control Panel, double-click the mouse settings icon. If you have the correct mouse driver installed, you should be able to assign functions to every button on your mouse. Assign the button that you would like to use for OSNAPS as F12 ( since this funciton key is not used for anything else ).
Open AutoCAD and go to the Tools pulldown menu, choose Customize, then Toolbars. On the Commands tab, click User-defined.
On the top right, drag and drop a User-Defined Button out of the dialog box. This just made a new button and toolbar.
Right-click on the new button and choose Properties.
Name the button something, like OSNAPS. Look for ^C^C in the Macro text field, and type
$p0=SNAP $p0=*
or cut and paste that from the Acad.mns file.
The string should look like the following:
^$p0=SNAP $p0=*
Select the Close button. Next, go to the Tools pulldown menu, choose Customize > Keyboard. Under Categories look for Toolbar1 Toolbar. If you have the right toolbar it should say OSNAPS under Commands. To the right under Press new shortcut key: pick the F12 button. Click the Assign button, Close, and try it.
The method above will also allow you to assign a Diesel macro function to your mouse buttons.