"Unknown Layer" error

"Unknown Layer" error

timrQBFG4
Participant Participant
2,830 Views
10 Replies
Message 1 of 11

"Unknown Layer" error

timrQBFG4
Participant
Participant

Hi, When I go to Layer Settings and try to choose "Preset_Standard" I get "Unknown Layer: 3" message.  What gives?

Reply
Reply
0 Likes
2,831 Views
10 Replies
Replies (10)
Message 2 of 11

rachaelATWH4
Mentor
Mentor

Hello,

 

I'm not sure why this would be, on my machine if I use the presets they only try to display the layers which are actually selected. What version of EAGLE are you using, on what OS, what license type? Does this happen on just a single board or across all of your boards?

 

Best Regards,

 

Rachael

Reply
Reply
0 Likes
Message 3 of 11

timrQBFG4
Participant
Participant

Hi,

Eagle 9.2.1 standard, windows 10 (pc). It seems to be connected with library parts I made in 6.2.

Reply
Reply
0 Likes
Message 4 of 11

timrQBFG4
Participant
Participant

I upgraded to 9.2.2 but the problem persists.

Oddly, when I open a project from version 6 it works okay.

When I create a new project, create a new schematic, create a board from the schematic, and try the "Preset_Standard" thing I get the error. I did not load any libraries or DRUs.

Reply
Reply
0 Likes
Message 5 of 11

C.Nicks
Advisor
Advisor

I've seen this issue for a while now. Sometimes the display alias settings get corrupted and need reset.
I keep all of my display presets (and grids) in a PRESETS.scr file. That way I can easily make my settings portable. I have found that in newer (>8) versions if an alias uses another alias name within the display field, Eagle will corrupt those periodically. For me any alias that used a name instead of layer number gets set to layer 0, which is not a valid layer. Rerunning the presets script file fixes it. In previous versions Eagle had no issue using display presets within display presets.

An example:
A common layer set is defined DISPLAY = '_common' 17 18 20;
Then a base setup is defined DISPLAY = 'tBase' none _common 1 tOrigins tStop;

This works at first, then gets corrupted somewhere along the way. Now anytime I run a script or ulp that uses display presets, I first run the setup script.

To the original question, it seems strange that a valid layer would give that error. You should check your eagle.scr file for the setup. You can edit the layers it uses or remove it altogether with the following.
DISPLAY = 'Preset_Standard';

If anyone is interested in trying out my settings and seeing if they get the same issues, add the following to your eagle.scr.

DISPLAY = '_All' _copper _silk 19 20 23 24; #All the useful layout layers, this will replace the standard all on a shortcut and will not turn on documentation
DISPLAY = 'tBase' none _common 1 tOrigins tStop;
DISPLAY = 'bBase' none _common 16 bOrigins bStop;
DISPLAY = 'tPlan' tBase -1 tPlace tKeepout;
DISPLAY = 'bPlan' bBase -16 bPlace bKeepout;
DISPLAY = 'tRoute' tBase 16 ;
DISPLAY = 'bRoute' bBase 1 ;
DISPLAY = 'tSilk' none _common 21 23 25 29;
DISPLAY = 'bSilk' none _common 22 24 26 30;
DISPLAY = 'PDF' none 20 21 46 47 48 51 ?? 147; # For printing
DISPLAY = '_copper' 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18; #All copper layers, not sure if this is useful or not?
DISPLAY = '_internal' _common 2 3 4 5 6 7 8 9 10 11 12 13 14 15 ;
DISPLAY = '_silk' 21 22 25 26 ?? 121 122 125 126 221 222 225 226; #every layer that has silkscreen
DISPLAY = '_tSolo' -16 -22 -24 -26 -28 -30 -32 -40 -42 -52 ?? -122 -126; #Turns off all bottom layers
DISPLAY = '_bSolo' -1 -21 -23 -25 -27 -29 -31 -39 -41 -51 ?? -121 -125; #Turns off all top layers
DISPLAY = '_doc' 46 47 48 51 52 ?? 50 100 102 120; # Document layers
DISPLAY = '_common' 17 18 20;

Best Regards,
Cameron

Eagle Library Resources


Kudos are much appreciated if the information I have shared is helpful to you and/or others.
Did this resolve your issue? Please accept it "As a Solution" so others may benefit from it.

Reply
Reply
0 Likes
Message 6 of 11

timrQBFG4
Participant
Participant

Hi,

Thanks! That explains a lot. I don't think it is the eagle.scr file that is causing the issue because it is happening in brand new projects with eagle generated eagle.scr files.

 

Do you know where the default settings are stored? I am curious.

--TimR

Reply
Reply
0 Likes
Message 7 of 11

timrQBFG4
Participant
Participant

Cancel that. I confused .epf and .scr.

Reply
Reply
0 Likes
Message 8 of 11

Anonymous
Not applicable

I have the same problem with a fresh install (9.3.1 on win7 and 9.3.2 on ubuntu). When I want to switch the visible layer-set preset with the little upside-down triangle menu to "Preset_Standard" I get the error "Unknown layer: 2". When I click the layers button and enter layer settings and visible layers dialog window, I can change the layer set in the selectbox without an error. This also happens when I open a completely new board.

Reply
Reply
0 Likes
Message 9 of 11

Anonymous
Not applicable

I found a workaround: open the .brd and .sch files in a text editor (they're just XMLs) and insert these lines:

<layer number="2" name="layer2" color="15" fill="1" visible="no" active="no"/>
<layer number="3" name="layer3" color="15" fill="1" visible="no" active="no"/>
<layer number="4" name="layer4" color="15" fill="1" visible="no" active="no"/>
<layer number="5" name="layer5" color="15" fill="1" visible="no" active="no"/>
<layer number="6" name="layer6" color="15" fill="1" visible="no" active="no"/>
<layer number="7" name="layer7" color="15" fill="1" visible="no" active="no"/>
<layer number="8" name="layer8" color="15" fill="1" visible="no" active="no"/>
<layer number="9" name="layer9" color="15" fill="1" visible="no" active="no"/>
<layer number="10" name="layer10" color="15" fill="1" visible="no" active="no"/>
<layer number="11" name="layer11" color="15" fill="1" visible="no" active="no"/>
<layer number="12" name="layer12" color="15" fill="1" visible="no" active="no"/>
<layer number="13" name="layer13" color="15" fill="1" visible="no" active="no"/>
<layer number="14" name="layer14" color="15" fill="1" visible="no" active="no"/>
<layer number="15" name="layer15" color="15" fill="1" visible="no" active="no"/>

between layer number="1" and layer number="16" (in both files). Save in the text editor and reopen in eagle. No more "unknown layer" errors!

Reply
Reply
Message 10 of 11

4jochen
Community Visitor
Community Visitor

OK, inserting the "not needed" Layers 2 to 15 into a 2 Layer Layout manually by edditing the *.brd file is strange - BUT ! works !

Maybe the AutoDesk coders can have a deaper look into this issue.

I found in my *.brd file:

 

<layer number="1" name="Top" color="4" fill="1" visible="no" active="yes"/>
<layer number="2" name="Route2" color="16" fill="1" visible="no" active="no"/>
<layer number="15" name="Route15" color="23" fill="1" visible="no" active="no"/>
<layer number="16" name="Bottom" color="1" fill="1" visible="yes" active="yes"/>

 

Yes, I have the "Standard" License with up to 4 layers, so that makes sense - somehow, but I have no Layer 3.

So why the error "Layer 3 missing"" or in my case "Unbekannter Layer: 3".

Also in the eagle.scr I found all 16 layers activated for "Preset_Standard".

But even deleting Layers 2 to 15 in the eagle.scr file does not solve this issue.

So, THANKS for the "edit the *.brd file" workaround, very much.

Reply
Reply
0 Likes
Message 11 of 11

lotharek
Community Visitor
Community Visitor

i tried all to solve above issue..

 

workaround:

 

made new directory only for eagle...

* copied all necessary dirs to above dir

* set up  directory options

* then edited eagle.scr line in new dir/scripts  (removed layers not present 3 to 14)

 

DISPLAY = 'Preset_Standard' None 1 2 15 16 17 18 19 20 21 22 23 24 25 26 39 40 41 42 51 52

and works...

Reply
Reply
0 Likes