A set of Layer Toggle commands are provided to allow the visibility of specific layers or layer combinations to be quickly toggled on or off.
Shortcuts
Default Keys: None
Default Menu: None
Command: Set Toggle Layers
Locating this option
Available from: Layers bar > Context menu > Set Toggle Layers option
Available from: Toggle Layers bar > Setup option
Using Toggle Layer commands
A set of one hundred ‘Toggle Layer n’ commands are provided, which by default, are not present on any menu but are available, via Customise, for assigning to a shortcut key, toolbar or menu.
By default, a particular Toggle Layer command will toggle the correspond layer in the defined layer order. For Keyboard page of the Customise dialog, will mean that the third layer, as defined in the Layers page of the Technology dialog, will be toggled on or off whenever the Alt+3 key is pressed. The defined layer order is also shown in the Layers Bar if displayed.
It is possible however, to change the layer or layers to which a particular Toggle Layer command applies. Selecting Set Toggle Layers from the Layers Bar right click shortcut menu will display the Layer Toggle Setup dialog.
Using the dialog
Toggle Layer
This dialog shows all the available Toggle Layer commands and their, Number, if any, Name down the left side of the grid alongside a slot for specifying a command detailing the layer or layers to which each should apply. The commands can be modified by typing directly into the cell or, alternatively, constructed by using the set of controls at the bottom of the dialog.
Name
The Name of each command, which act as a more readable, shorthand, name for the given command, can be added or edited by typing directly into their respective cell or into the Name edit box below the grid when the row is selected. These are also know as Alias names.
Layer Visibility Rule
Below the dialog within the Layer visibility Rule section provides a graphical entry for creating user-defined layer toggle commands. Commands can be created and edited here. All commands within the list on the right side of this section will be automatically added to the Layer Toggle grid at the top of the dialog.
Save In Design
Selecting this button enables the Toggle Layer settings to be saved into the design, considered Design Toggle Layers. This might be useful if the layers are specific to a design or in a different language for example. If left unchecked, the Toggle Layer settings are considered to be Local and saved into your local registry. you can switch between, and use a combination of Local and Design from the Toggle Layers Bar.
The Toggle Layer Grid
An empty slot implies the default association with corresponding layer in the layer order. Typing a specific layer name next to a particular Toggle Layer command will cause it to apply to that layer. Continuing the example from earlier, if “Top Elec” is entered next to the Toggle Layer command 3 then pressing Alt+3 now will toggle the layer named “Top Elec”.
All Toggle Layer definitions will be saved and restored whenever the application is restarted and are independent of any particular PCB design.
A Toggle Layer command associated with an unrecognised layer will have no effect.
Selecting an empty Layer Toggle slot in the grid, allows a new command to be entered alternatively you can press the New button which will find and select the first empty (free) row.
The Copy button will be enabled when the currently selected row (or cell within a row) contains commands. When clicked, the currently selected row will be copied to the next empty (free) row and will be selected.
The Delete button will be enabled when the currently selected row contains commands and is not the first row. When clicked, the currently selected row will be deleted and the last row to have commands will be selected.
The currently selected row will be underlined in red, indicating it is ready to have a new command entered (or an existing command edited). The command list within the Layer Visibility Rules section will be automatically filled with the commands in the newly selected row and the other controls will be populated with the details of the first layer rule in the list. If there are no commands in the newly selected row, then a new default layer rule will be added to the list and their details populated in the relevant controls. This is now ready to be edited.
Layer Visibility Rule Controls
This section consists of a list of layer rules shown on the right side and controls to create or edit a layer rule on the left side. The list of layer rules make up a toggle layer command. The controls on the left edit the currently selected (blue highlighted) rule in the list on the right.
Controls on the left side of this section will be enabled and disabled depending on the selection in other controls. For example, you can only define a side when a Layer Class has been selected from the Layer combination box.
Like the controls on the left, the list buttons will be enabled and disabled based on the content in the list.
The Add button starts a new layer visibility rule and adds a default rule to the list on the right. This is now ready to edit.
The Remove button deletes the currently selected rule in the list. It will then select the next rule above (or below if nothing above) and automatically fill the controls on the left with their new values.
The Move Up button moves the currently selected layer rule up one position.
The Move Down button moves the currently selected layer rule down one position.
Layer Toggle Commands
Keywords
If you want a Toggle Layer command to set a layer to be specifically visible or invisible rather than toggling between the two there are additional keywords that can be used as a prefix to the layer(s) specification. These keywords and their effect are described below:
Show - the specified layer(s) will always be made visible.
Hide - the specified layer(s) will always be made invisible.
ShowEx - the specified layer(s) will always be made visible and all other layers will be made invisible.
HideEx - the specified layer(s) will always be made invisible and all other layers will be made visible.
Toggle - the specified layer(s) will toggle between being visible and invisible.
Plane - the Power Plane on the specified layer(s) will toggle between being visible and invisible.
For example, defining Toggle Layer 3 as “ShowEx Electrical Top, Electrical Bottom” will allow the top and bottom electrical layers to be shown exclusively with all other layers hidden.
Layers, Layer Class and Side
The set of controls provided at the bottom of the dialog allow a new Layer Toggle command to be constructed or an existing Layer Toggle command to be edited.
The Layer combination box contains all the layer names and classes in the current PCB design grouped together by whether it is a layer name or layer class. A Layer must be selected to create a valid toggle layer command and specifies what layer(s) the command is to act on.
As layer names can vary between designs it may be preferable to associate layers by characteristics rather than their explicit names.
Side provides the additional optional field which allow for more detailed control when a Layer Class toggle is being created.
Omitting Side and just specifying a Layer Class implies ALL layers of that class regardless of where they appear in the layer stack.
Index is available if the Side is selected as Inner. This will be a numeric value that refers to the Inner layer in the sequence it appears (in the Inner Layers list). It might be a more suitable alternative choice when specifying a specific inner layer (rather than all inner layers) to use a named layer command instead.
Omitting the Index when specifying Inner implies ALL inner layers, so “Electrical Inner” will toggle all the inner electrical layers.
The Layer Name, Layer Class and Side are defined in the Technology dialog.
Switching Multiple Layers On And Off Simultaneously
Use the check box Opposite Toggle to visibly switch a layer the opposite way to the first layer specified.
Where multiple layers are specified for a single Toggle Layer command, it is possible to simultaneously turn some of them on and some of them off thus allowing ‘sets’ of layers to be visibly switched. To achieve this, any layer to be switched the opposite way to the first layer specified should be followed by the word off. For example, defining Toggle Layer 3 as “Electrical Top, Electrical Bottom, Electrical Inner off” will allow the top and bottom electrical layers to be made visible and at the same time, all inner electrical layers to be made invisible. Using the Toggle Layer 3 command again will have the reverse effect.
Toggle Layer Combinations
Toggling Multiple Layers Simultaneously
It is possible to specify more than one layer against a single Toggle Layer command so that a ‘set’ of layers are toggled when the command is used. Within the Toggle Layer grid, each layer definition should be separated by a comma. For example, Toggle Layer 3 could be extended to be “Electrical Inner 1, Electrical Inner 2” which would toggle both the specified inner electrical layers simultaneously. In the list, each command is shown on a new line.
So “Electrical Top” would always match the electrical layer on the top side regardless of whether it was named “Top”, “Top Elec” or anything else, “Paste Mask Bottom” would always match the bottom paste mask layer if defined. Continuing again with the earlier example, if “Electrical Inner 2” is entered next to Toggle Layer 3, then pressing Alt+3 now will toggle the second inner electrical layer in a PCB design regardless of what it is called.
When a Toggle Layer entry has had a layer specification entered its command name, as seen in the Customise Keyboard dialog for example, will change to include the layer specification rather than the default ‘Toggle Layer n’ command. In the example given earlier the command will appear as “Toggle Layer: Electrical Inner 2” rather than “Toggle Layer 3”.
Related Topics
Toggle Layers Bar | Keyboard Customisation | Layers Bar | Technology Layers | Technology Layer Class