Author Topic: Hotkey to manually pan/scroll around within AutoCAD?  (Read 10966 times)

0 Members and 1 Guest are viewing this topic.

Robb

  • Guest
Hotkey to manually pan/scroll around within AutoCAD?
« on: December 19, 2006, 10:10:48 PM »
Is there a hotkey or command that will allow me to manually manuever around in autocad? Kind of like the arrows in an excel document or page_up/page_dn keys?

I have a long schedule that I want to move up and down in but using pan seems like a slower method. If I could hit something like the arrow keys or pgup/pgdn then that would rock!


jonesy

  • SuperMod
  • Seagull
  • Posts: 15568
Re: Hotkey to manually pan/scroll around within AutoCAD?
« Reply #1 on: December 20, 2006, 07:29:04 AM »
Something like control and middle button?

Or was you thinking about something else?
Thanks for explaining the word "many" to me, it means a lot.

Gliderider

  • Guest
Re: Hotkey to manually pan/scroll around within AutoCAD?
« Reply #2 on: December 20, 2006, 08:49:01 AM »
Or Shift+ Middle Button to pan orthogonally.

David Hall

  • Automatic Duh Generator
  • King Gator
  • Posts: 4076
Re: Hotkey to manually pan/scroll around within AutoCAD?
« Reply #3 on: December 20, 2006, 09:44:01 AM »
or the old school method, -pan with ortho turned on
Everyone has a photographic memory, Some just don't have film.
They say money can't buy happiness, but it can buy Bacon and that's a close second.
Sometimes the question is more important than the answer. (Thanks Kerry for reminding me)

dan19936

  • Guest
Re: Hotkey to manually pan/scroll around within AutoCAD?
« Reply #4 on: December 20, 2006, 05:34:05 PM »
I use custom accelerators and just added the pan option. Works well with CTRL and numpad arrows, but regular numpad always echos the number which screws up the next command. The remaining code is used to offset dimension lines a standard amount of 3/8" times the dimension scale.

Dan

Code: [Select]
***ACCELERATORS
["NUMPAD5"]^P(xyz_keydist "get" nil)
["NUMPAD6"]^P(xyz_keydist "0" nil)
["NUMPAD9"]^P(xyz_keydist "45" nil)
["NUMPAD8"]^P(xyz_keydist "90" nil)
["NUMPAD7"]^P(xyz_keydist "135" nil)
["NUMPAD4"]^P(xyz_keydist "180" nil)
["NUMPAD1"]^P(xyz_keydist "-135" nil)
["NUMPAD2"]^P(xyz_keydist "-90" nil)
["NUMPAD3"]^P(xyz_keydist "-45" nil)
[CONTROL+"NUMPAD5"]^P(xyz_keydist "get" 2.0)
[CONTROL+"NUMPAD6"]^P(xyz_keydist "0" 2.0)
[CONTROL+"NUMPAD9"]^P(xyz_keydist "45" 2.0)
[CONTROL+"NUMPAD8"]^P(xyz_keydist "90" 2.0)
[CONTROL+"NUMPAD7"]^P(xyz_keydist "135" 2.0)
[CONTROL+"NUMPAD4"]^P(xyz_keydist "180" 2.0)
[CONTROL+"NUMPAD1"]^P(xyz_keydist "-135" 2.0)
[CONTROL+"NUMPAD2"]^P(xyz_keydist "-90" 2.0)
[CONTROL+"NUMPAD3"]^P(xyz_keydist "-45" 2.0)
["F1"]^p(princ "\nHelp disabled, used menu")(princ)

Code: [Select]
;;;=========================================================================
;;; xyz_KEYDIST - Combines input distance with direction for use with numeric keypad accelerators
;;;=========================================================================
(defun-q xyz_keydist ( angle mult / return)
  (if (= 0 (getvar "cmdactive"))
    ;; pan if no command active
    (progn
      (command "-pan" (getvar "viewctr") (strcat "@" (rtos (/ (getvar "viewsize") -4.0)) "<" angle))
    )
    ;; return number if active
    (progn
      (if (not mult)(setq mult 1))
      (if (or (not xyz_KEYDIST_VALUE)
              (= angle "get")
          ) ;or
        (setq xyz_KEYDIST_VALUE
               (xyz_getdist nil ;no base point
                            "\nEnter distance for keypad entry" ;prompt
    ;;                        (if xyz_KEYDIST_VALUE ;use global if it exists, else 3/8" in drawing scale
    ;;                          xyz_KEYDIST_VALUE
                              (* 0.375 (getvar "dimscale"))
    ;;                        )
               ) ;xyz_getdist
        ) ;setq
      ) ;if
      (setq return (strcat "@" (rtos (* mult xyz_KEYDIST_VALUE)) "<" angle))
    )
  )
  (if return return (princ))
) ;defun

;;;==========================================================
;;; Get Distance with Default - from Looking Glass Microproducts
;;;==========================================================
(defun-q xyz_getdist (base prmpt default)
   (Setq
      prmpt (Strcat
               prmpt
               (If default
                  (Strcat " <" (RtoS default) ">")
                  ""
               )
               ": "
            )
   )
   (Cond
      ((If base
          (GetDist base prmpt)
          (GetDist prmpt)
       )
      )
      (default)
   )
)


Dinosaur

  • Guest
Re: Hotkey to manually pan/scroll around within AutoCAD?
« Reply #5 on: December 20, 2006, 06:29:12 PM »
Do you have scroll bars to turn on in ADT?  I hate the things and always forget they are there until I have to set up a fresh install.

Robb

  • Guest
Re: Hotkey to manually pan/scroll around within AutoCAD?
« Reply #6 on: December 24, 2006, 12:51:16 AM »
Do you have scroll bars to turn on in ADT?  I hate the things and always forget they are there until I have to set up a fresh install.

Yes, I tried with scroll bard on. I usually disable them but I've tried with them on to see if that enables anything. I cant seem to find any hotkeys that will allow me to navigate around the drawing (like panning) bit without using the mouse... I'd prefer use the keyboard... something like arrow keys or pgup/pgdown

thanks for the code guys... will try those.