Copy link to clipboard
Copied
I have this reference layer that i'm turning on and off quite frequently, is there a way to setup shortcut to speed up my workflow? Ideally would be awesome to setup keystroke "1"
Copy link to clipboard
Copied
Well, since it doesn't take long to Alt/Option click the eye next to a layer to view only that layer and then Alt/Option click in the eye column again to view all layers, this may not save you much time. You would need two shortcuts, one to view only the reference layer and one to view all the layers except the reference layer. To set up the shortcut, view the file as you want to view it. Then choose View > New View and give the view a name. The view will remember what is showing and also the zoom level. Then you can go to Edit > Keyboard Shortcuts. Choose Menu Commands, and then expand the View menu to enter a keyboard shortcut. .
Copy link to clipboard
Copied
Another possibility would be to create an Action. Open the Actions panel and when you create an action you can choose a function key for the action. You'll find commands to show and hide layers in the Actions panel menu.
Copy link to clipboard
Copied
Thanks for the reply, the action menu is something i didn't know but i actually found an alternative way of doing this that does save a lot of time.
I created my reference layer into a template layer, which allowed me to use the hide template command under view, which worked perfectly. Though maybe you can help out with another problem i ran into.
For some reason I can't assign shortcuts to the numbers? What are those for?
Copy link to clipboard
Copied
I'm not sure what you're referring to.
Copy link to clipboard
Copied
If you are making an Action - you can use only F keys with CTRL or Shift - it's typical sitiuation
Copy link to clipboard
Copied
This script will toggle a layer named "Reference" on or off. It can be saved as a "JSX".
var aDoc = app.activeDocument;
var myLayer = aDoc.layers.getByName("Reference");
myLayer.visible ^= 1;
It can be added to the "/Applications/Adobe Illustrator CC 2015.3/Presets.localized/en_US/Scripts" folder and run from within AI (after restart). CC 2015 does NOT let the user assign a keyboard shortcut to scripts. Maybe later versions do).
For REAL automation power I'd suggest looking at Keyboard Maestro (Mac only). It allows the user to write macros in a "drag-n-drop" interface. Among many other features you can assign shortcuts to any menu item in any application. You can also run Javascript files written for any application including Adobe CC apps.
Copy link to clipboard
Copied
rcraighead wrote
CC 2015 does NOT let the user assign a keyboard shortcut to scripts. Maybe later versions do).
Later versions allow to set a shortcut for an Action that uses a script.