EAGLE Central Forums
Where the EAGLE community meets. Sponsored by Stratford Digital.

Home » CadSoft Support Forums » eagle.suggest.eng » Toggling all layers associated with the Top or Bottom metal Layers
Toggling all layers associated with the Top or Bottom metal Layers [message #165966] Sun, 05 June 2016 15:52 Go to next message
Jim Hannas
Messages: 3
Registered: February 2015
Junior Member
When the Layers window is opened, you have  NEW, CHANGE, DEL, ALL and NONE.

I recall that earlier editions would toggle all of the Top or Bottom layers associated with the metal layers when the Top or Bottom metal layers were toggled.

It would be nice to add 2 buttons to the "Layers Display",  such as  "All-TOP"  and  "All-BOT",  which would toggle any layer that starts with 't' or 'b'.
It is very time consuming to do this by hand when working with parts on both sides of a PCB,  sometimes hundreds of times per day.:(

--
To view any images and attachments in this post, visit:
https://www.element14.com/community/message/198817
Re: Toggling all layers associated with the Top or Bottom metal Layers [message #165969 is a reply to message #165966] Sun, 05 June 2016 19:33 Go to previous messageGo to next message
Olin
Messages: 903
Registered: December 2009
Location: Massachusetts
Senior Member
Jim Hannas wrote on Sun, 05 June 2016 11:52

I recall that earlier editions would toggle all of the Top or Bottom layers associated with the metal layers when the Top or Bottom metal layers were toggled.


Huh? What?

Quote:

It would be nice to add 2 buttons to the "Layers Display",  such as  "All-TOP"  and  "All-BOT",  which would toggle any layer that starts with 't' or 'b'. It is very time consuming to do this by hand when working with parts on both sides of a PCB, sometimes hundreds of times per day.Sad


So what you're really asking for is a quick way to select a certain group of layers to be displayed. That is already available, and I do it routinely. Create scripts for the configurations you want. Then you can run the script simply by entering "scr <name>". Or for even faster access, assign the "script <name>" commands you use often to hot keys.
Re: Toggling all layers associated with the Top or Bottom metal Layers [message #165972 is a reply to message #165966] Mon, 06 June 2016 05:22 Go to previous messageGo to next message
Lorenz
Messages: 639
Registered: December 2006
Senior Member
Jim Hannas wrote:
> When the Layers window is opened, you have  NEW, CHANGE, DEL, ALL and NONE.
>
> I recall that earlier editions would toggle all of the Top or Bottom layers associated with the metal layers when the Top or Bottom metal layers were toggled.
>
> It would be nice to add 2 buttons to the "Layers Display",  such as  "All-TOP"  and  "All-BOT",  which would toggle any layer that starts with 't' or 'b'.
> It is very time consuming to do this by hand when working with parts on both sides of a PCB,  sometimes hundreds of times per day.:(

some years ago I wrote togLayer.ulp.
It is meant to be assiged to a hotkey and takes three groups of layer
numbers from the command line. For instance:

run togLayer 1 21 !16 22 = 23 24

will toggle layer 1 and 21 dependinf on the current visibility of
layer 1.
In addition layer 16 and 22 are toggled reversely.
Layer 23 and 24 are forced to keep their current visibility.

The second and thired group (and there separators ! and =) are
optional.


> int getVis (int l)
> {
> int v = 0;
>
> project.board(B) B.layers(L)
> if (L.number == l) v = L.visible;
>
> return v;
> }
>
> string cmd;
>
> string appendLayer (int l, int v)
> {
> string s;
>
> if (v == 1)
> sprintf(s, " %d", l);
> else
> sprintf(s, " -%d", l);
>
> return s;
> }
>
> void main (void)
> {
> int wasSchematic = schematic && project.board;
>
> if (wasSchematic )
> cmd = "edit .brd;";
>
> // if (board)
> {
> int l, v, n = 2;
> string s;
>
> // check first parameter
> if ((l = strtol(argv[1])) != 0)
> {
> // prepare cmd to invert first layer visibility
> cmd += "display";
> v = getVis(l);
> cmd += appendLayer(l, 1-v);
>
> // for the following parameters up to a ! or =
> // append cmds to force the same visibility
> while ((n < argc) && ((l = strtol(argv[n])) != 0))
> {
> cmd += appendLayer(l, 1-v);
> n++;
> }
>
> // for the parameters following a ! up to a =
> // append cmds to force the opposite visibility
> n++;
> while ((n < argc) && ((l = strtol(argv[n])) != 0))
> {
> cmd += appendLayer(l, v);
> n++;
> }
>
> // for the parameters following a =
> // append cmds to force the visibility to not change
> n++;
> while ((n < argc) && ((l = strtol(argv[n])) != 0))
> {
> cmd += appendLayer(l, getVis(l));
> n++;
> }
>
> cmd += ";";
> }
> }
>
> if (wasSchematic )
> cmd += "edit .sch;";
>
> if (cmd != "")
> {
> //dlgMessageBox(cmd);
> exit (cmd);
> }
> }
--

Lorenz
Re: Toggling all layers associated with the Top or Bottom metal Layers [message #165979 is a reply to message #165966] Mon, 06 June 2016 23:32 Go to previous message
warrenbrayshaw
Messages: 1739
Registered: January 2010
Location: New Zealand
Senior Member
Not mentioned so far is the use of display aliases

Set the layers as you want them for one view.
Then right click on the layer icon
Give your view an alias name
Repeat for the other view.

In use, right click and select your alias

This is explained in HELP > Find: ALIAS > DISPLAY> Parameter Aliases

HTH
Warren
Previous Topic: Changing Pin Assignments in a Package
Next Topic: TO-92 FOOTPRINTS
Goto Forum:
  


Current Time: Mon Apr 24 23:04:52 GMT 2017