layout changing shortcut

layout changing shortcut

Anonymous
Not applicable
9,472 Views
11 Replies
Message 1 of 12

layout changing shortcut

Anonymous
Not applicable

Hello,

I use the heck out of CTRL+Page Up and CTRL+Page Down. I'm wondering if there is a way to change the shortcut keys or create new ones so I can use it with just my left hand on the left side of the computer like almost everything else that I do.

 

Would be much appreciated!

-Michael

0 Likes
9,473 Views
11 Replies
Replies (11)
Message 2 of 12

pendean
Community Legend
Community Legend
Nope, there are no "pages" in AutoCAD.

But there are PAN UP, PAN DOWN as well as PAN LEFT and PAN RIGHT macros defined in CUI command that you can assign to buttons or keyboard button combos in CUI.

0 Likes
Message 3 of 12

Anonymous
Not applicable

Oh, I'm sorry I wasn't very clear. I meant the CTRL+ Page Up/Down shortcuts for changing layouts. I cycle through my layouts constantly and I'm just looking for a little quicker way.

 

Thanks! 🙂

Michael

Message 4 of 12

ВeekeeCZ
Consultant
Consultant

You probably cannot change these shortcuts or add new ones.

But, unless you're on LT, we could write a LIST routine that would do the same. Then you could assign any keystrokes to that. 

0 Likes
Message 5 of 12

RobDraw
Mentor
Mentor

@pendean wrote:
Nope, there are no "pages" in AutoCAD.


 

Most people call them layouts.


Rob

Drafting is a breeze and Revit doesn't always work the way you think it should.
Message 6 of 12

BrianBenton
Collaborator
Collaborator

I'm not sure to make that any faster. CTRL+PAGE UP/DOWN is pretty fast. However there are other methods to switch between Layout Tabs in a file. Click the exact Layout you want to switch to it. Or in the File Tab, mouse over to display a thumbnail of the files Layout Tabs and click the one you want to go to. This method takes the computer longer to process it. I hardly use that one myself unless it's an accident! 

 

But one method you might be able to do is to get a programmable mouse with extra buttons. Program one button for CTRL+PU and another with CTRL+PD.  Then that becomes one click without any arm/hand movement. 

Brian C. Benton

[email protected]
http://CAD-a-Blog.com
twitter.com/bcbenton
www.facebook.com/CADaBlog


0 Likes
Message 7 of 12

ВeekeeCZ
Consultant
Consultant

@ВeekeeCZ wrote:

You probably cannot change these shortcuts or add new ones.

But, unless you're on LT, we could write a LIST routine that would do the same. Then you could assign any keystrokes to that. 


 

Here are suggested routines. HERE how to work with LISPs. HERE how to create a custom command where field 'macro' would be filled with a routine name: LayoutNext or LayoutPrevious.

(defun c:LayoutNext nil
  (setvar 'ctab (cadr (member (getvar 'ctab) (append '("Model") (:LayoutsRealOrder) '("Model")))))
  (princ)
  )

(defun c:LayoutPrevious nil
  (setvar 'ctab (cadr (member (getvar 'ctab) (append '("Model") (reverse (:LayoutsRealOrder)) '("Model")))))
  (princ)
  )


(vl-load-com)

; pbejse https://forums.autodesk.com/t5/visual-lisp-autolisp-and-general/layout-order/td-p/3749964
(defun :LayoutsRealOrder (/ order)
  (vlax-for lay (vla-get-layouts (vla-get-ActiveDocument (vlax-get-acad-object)))
    (setq order (cons (list (vla-get-name lay)
                            (vla-get-taborder lay))
                      order)))
  (mapcar 'car (cdr (vl-sort order '(lambda (j k) (< (cadr j) (cadr k)))))))
0 Likes
Message 8 of 12

Kent1Cooper
Consultant
Consultant

Well, @ВeekeeCZ got in while I was coming up with this, but here's my somewhat simpler version:

 

(defun c:TabN (/ tab tabs)
  (setq tabs (layoutlist) tab (getvar 'ctab))
  (setvar 'ctab
    (if (member tab (list "Model" (last tabs)))
      (car tabs); then
      (cadr (member tab tabs)); else
    ); if
  ); setvar
); defun

(defun c:TabP (/ tab tabs)
  (setq tabs (layoutlist) tab (getvar 'ctab))
  (setvar 'ctab
    (if (member tab (list "Model" (car tabs)))
      (last tabs); then
      (cadr (member tab (reverse tabs))); else
    ); if
  ); setvar
); defun

 

Assign them to shortcut key combinations as you like, or give them different command names that are only-left-hand combinations.

 

What's simpler is that they cycle in creation order, which isn't necessarily the displayed sequence of the tabs at the bottom, as BeekeeCZ's and Ctrl+PgUp/PgDn do it.

 

They also assume, because of your Topic wording, that you don't want "Model" included in the cycling, though if you're in Model space when you call one of them, it takes you into the Layout tabs.  Curiously, I find that Ctrl+PgUp/PgDn don't  "wrap" around the end and take you to the other end of the series, but these do  [again, omitting Model space, once they're into Layouts], as do BeeKeeCZ's commands.

Kent Cooper, AIA
Message 9 of 12

Anonymous
Not applicable

This is perfect. Thank you! I didn't know that you could just type in a lisp command name in the macro field for shortcuts.

 

Thanks much!

Michael

0 Likes
Message 10 of 12

Anonymous
Not applicable

Thanks for the help Kent,

Your lisp worked fine, but I do like the BeekeeCZ's feature of cycling through the current order of layouts rather than the creation order. We often add layouts later in the middle so it would be kind of wonky for me.

 

But thanks again!

Michael

0 Likes
Message 11 of 12

adeel3344
Observer
Observer

wao

0 Likes
Message 12 of 12

adeel3344
Observer
Observer

wao. thanks

0 Likes