Shortcut to set current layers?

I use a handful of layers very often and Id love to create a custom keyboard shortcut to set the specific layer as current. So for example, if im on layer 0.3 currently and want to switch to layer 0.7, I currently must open the layers panel and then double click on the 0.7 layer. However, Id love to have something like shift+7 to quickly set it to that layer. And shift+3 to set it to 0.3… shift+5 to set to 0.5, etc. And maybe shift+T to set it to my text layer. Is this possible? How?
Thank you.

Hi Peter -

_-Layer _Current "Layer name" _Enter

(Layer command with a dash in front)

-Pascal

2 Likes

Thank you @pascal !!!

Hi again, so Im loving this command but I want to improve it. Now I have several shortcuts for different dimension layers: 1/4", 1/8", 1/2", etc. The layer changes nicely but I still have to manually adjust the “annotation style” to the corresponding dimension. So if I set my layer to 1/4", then I still have to set the annotation style to 1/4" when Im starting a new dimension. How can I add to this shortcut to also change the annotation style? This would be gamechanger. Thank you.

I tried this code in the keyboard macros but it ends with the popup window asking me to select the annotation style instead of automatically selecting it:

_-Layer _Current “DIMS MODEL 1/8” _Enter _setcurrentannotationstyle _Current “MODEL SPACE 1/8” _Enter

Screenshot 2024-04-06 093738

Hi Peter - use the ‘dash’ version of a command to to bypass dialogs.

_-SetCurrentAnnotationStyle

-Pascal

1 Like

Thank you. This works perfectly now:

_-Layer _Current “DIMS MODEL 3/8” _Enter _-setcurrentannotationstyle “MODEL SPACE 3/8” _Enter