How To Open Pcb File In Eagle

A quick guide to using and personalizing Eagle configuration script files to tailor settings to your needs.

FavoritedFavorite1

Hello, Can Altium files be imported into Eagle Pro? (I am referring to Altium schematics, PCB files and library files) Also, is the import process perfect, and no discrepancies are produced whatsoever?, the imported Altium files, when converted, will not even need checking over? PCB file openers, viewers, etc. These apps are known to open certain types of PCB files. Remember, different programs may use PCB files for different purposes, so you may need to try out a few of them to be able to open your specific file.

Let's talk about Eagle Configuration Scripts: how to use them, and why using your own can make your Eagle experience more enjoyable and efficient.

Let me preface this by saying that there is more I do not know about Autodesk's EAGLE PCB Design Software than there is that I do. That said, this is just a quick explainer, and there will be plenty left unsaid about using Eagle scripts.

If you are new to Eagle or unfamiliar entirely, check out these tutorials to help you get started:

What is a Configuration Script?

Put simply, it's a file used to configure an instance of Eagle with specific settings when opened.

When an instance of an Eagle editor is opened, Eagle accesses a configuration script file (eagle.scr). The configuration script contains a series of commands written in human readable text that change the settings for any instance of an Eagle editor workspace when opened. These include: BOARD Editor, SCHEMATIC Editor, LIBRARY Editor, DEVICE Editor, PACKAGE Editor and SYMBOL Editor. By changing the set of commands within the configuration script, the user can customize the settings of any of the aforementioned Eagle editors without the tedium of having to manually change the settings every time you open up an instance of Eagle.

Perhaps the most valuable feature of a personalized configuration script is the ability to setup a hotkey assignment map and workspace that caters to how you use Eagle. Whether you are designing schematics, designing boards, designing both or just reviewing designs, you can tailor the configuration of Eagle to allow you to work more efficiently.

Eagle is distributed with a default configuration script; it sets some default layers to be used, sets the unit(s) of measure, sets the grid spacing and calls some .ulp files, plus a few more things. Check it out below:

This default Eagle configuration script by no means makes Eagle unusable, but you are stuck with some pretty basic configuration settings. We have a SparkFun Eagle Settings GitHub repository, which includes an Eagle configuration script that provides a good starting point for understanding how these scripts are used, and for personalizing your own.

If you are new to GitHub, below are a couple tutorials explaining what it is, and how it is used:

Below is a simple demo configuration script to use as an example. Let's quickly break down some of the script so that you can get started making or modifying your own!

Anatomy of a Configuration Script

The configuration script is broken into a section for each variation of an Eagle editor, and each type is denoted by an editor-specific label. These labels instruct Eagle to run only the portion of the script that is between the editor type label being opened and the next editor label. This means the user can customize unique configuration settings for each editor type, most importantly hotkeys.

Pcb
Eagle Editor Script Labels
Editor TypeEditor Label
SchematicSCH:
BoardBRD:
LibraryLBR:
DeviceDEV:
SymbolSYM:
PackagePAC:

The portion of the script that lies above all labels is considered global. These instructions will run for any editor type opened, and will run before the instructions under the editor-specific label are run. Instructions under an editor label will supersede any global instructions that were run prior to the editor label.

To add a comment to your script, insert a pound symbol (#) followed by the text for your comment. Each new line of comments will require a new preceding pound symbol. A comment can live on the same line as a command, assuming it is stated after the command.

Eagle Commands

Eagle utilizes a built-in set of text commands that tell it to do anything from setting a layer's color to setting default wire widths. These commands can be used in place of any of the toolbar buttons, and the command structure and syntax is standardized within Eagle. Conviniently, the commands that can be entered into the command line field of an editor workspace are identical to those that are used to populate an Eagle configuration script.

How To Open Pcb File In Eagle
  • As a side note - To utilize a command in a workspace, simply enter the command into the Eagle command line field with proper syntax and press enter. It should be said that some commands are specific to a certain type of editor, for example, a command specific to the schematic editor may return an error if entered into the command line of a board editor. This is also true of commands in a configuration script.

Lets look at a basic Eagle command used under the BRD: label in the above demo configuration script, and discuss the syntax and function. Checkout the command:

Grid inch 0.05 on;

This command tells Eagle to configure three settings:

  • inch - sets the unit of measure to be used for the grid to inches
  • 0.05 - sets the grid spacing to 0.05 units
  • on - sets the grid to be visible to the user

The command is 'Grid,' and the parameters are: 'inch,' '0.05' and 'on.' The semi-colon ';' tells Eagle that there are no more parameters. Remember, this command lives under the BRD: label, which dictates that this command will only be used when opening an instance of the board editor.

You can easily chain together parameters for one command by listing them separated by a space, and terminating the command by adding the semi-colon at the end. Here's another example:

DISPLAY 1 16 17 18 19;

This tells Eagle to make layers 1, 16, 17, 18 and 19 visible to the user. It's pretty intuitive. Interestingly, one could design an entire schematic with a string of text using Eagle's built-in commands.

Writing and Editing a Configuration Script

Eagle contains a built-in text editor that can be used for writing/editing SCRIPT and ULP files, but you can use any text editor that allows you to choose the file extension when saving your file. Eagle script files have a .scr file extension, which can create an issue when using Windows and an external text editor. Windows views a .scr file as a screensaver file, which means users may have trouble opening this file with a text editor. To fix this, go into the default apps setting menu (WINDOWS 10) or Program settings (WINDOWS 7) and set the default app for .scr files to whichever text editor you prefer.

Another point to take note of is that the configuration script file must be named 'eagle.scr', and must live in the directory that is specified in the Directories: Scripts field.

Setting the Directory for your Configuration Script

To change/set any of the directory paths that Eagle uses to look for files, open up an instance of the Eagle Control panel, click on Options in the menu bar and click once more on Directories... in the drop-down. This will open the directories window, which houses the fields to set the file paths to the directories that contain files that you and Eagle want to use together. The Scripts field is where you set your configuration script file path.

For a detailed list of built-in Eagle commands, command descriptions and command usage examples, check out the Editor Commands section of the Eagle help utility, and for more information about Eagle scripts, check out the SCRIPT sub-section of the the Editor Commands section.

Eagle has a great built in HELP utility; it's an invaluable resource for novice and expert users alike. The HELP utility can be found on the far right of the menu bar on any main Eagle workspace window or the Eagle Control Panel.

Now go create your own Configuration Script!!!

...and be sure to let us know about your experiences using Eagle configuration scripts, plus any of your own tricks and tips, in the comments below.

In this Gerber tutorial, I will teach you how to create the files you need for a 2-layer board using Cadsoft Eagle. After you have completed this tutorial you will have all the necessary files needed to send to most PCB manufacturers.

This tutorial is out of date. I have switched to KiCad, so I recommend the updated tutorial How to Create Gerber Files in KiCad.

Step 1: Open the CAM Processor

In Eagle, open Board view. Click the “CAM” button or choose “File->CAM Processor”. This will open the CAM Processor tool that is used to generate the files.

How To Open Pcb File In Eagle Pass

Here you can define the sections you want to create files for.

But you don’t really need to understand this. Actually I have never really thought about the details of this until I was writing this article. I have just been using ready-made configurations. And that is probably what you want to do as well.

Step 2: Open a predefined job

To simplify creating Gerber files, Eagle comes with a predefined job for this. It is called gerb274x.cam.

(Note: If you want to order PCBs from Seeed Studio’s Fusion PCB service, you should instead download their own CAM-file from the bottom of their submission guidelines page. Be aware that this will give you different file names than the ones listed below in this article.)

To open it in the CAM Processor click “File->Open->Job…”

How to open .pcb file in eagle

Browse to your …/eagle/cam/ folder, and you should see a file called gerb274x.cam. Choose it and click “Open”.

You will now see five tabs in the CAM Processor. Each of these tabs will generate a Gerber file.

Step 3: Adding a second silk screen (Optional)

If you look at the tabs, you will see that you don’t have a file for silk screen bottom. For simple boards, the silk screen is usually on the top layer so that you don’t need the bottom. Some of the cheap circuit board manufacturers don’t even allow bottom silk screen.

But if you need silk screen on bottom layer as well, follow these steps:

  • Click “Add”
  • Change Section to something like “Silk Screen SOL”
  • Change File to “%N.pls”
  • Deselect all layers
  • Select layers 20 “Dimension”, 22 “bPlace” and 26 “bNames”

There you go.

Step 4: Create each gerber file

Select where you want to put the Gerber files by clicking on the “File” button and choosing a folder. Do this for all the tabs.

Then click “Process Job”. This creates your Gerber files.

Pcb Open For Business

Step 5: Adding file for drill holes

What is a pcb file

Even though drilling is supported by the Gerber format, manufacturers usually want the Excellon file format for specifying drill holes. Luckily, Eagle also comes with a predefined job for creating a drill file.

(Note: This step is automatically done if you’re using the CAM-file from Seeed Studio that I linked to in step 2.)

Open it in the CAM Processor by clicking “File->Open->Job…”

Browse to your …/eagle/cam/ folder, and open the file named “excellon.cam”.

Select where to put the output file by clicking on the “File” button.

Then click “Process Job” to create your Excellon file.

Step 6: Check output files

You should now have the following files:

  • *.cmp (Copper, component side)
  • *.drd (Drill file)
  • *.dri (Drill Station Info File) – Usually not needed
  • *.gpi (Photoplotter Info File) – Usually not needed
  • *.plc (Silk screen, component side)
  • *.pls (Silk screen, solder side)
  • *.sol (Copper, solder side)
  • *.stc (Solder stop mask, component side)
  • *.sts (Solder stop mask, solder side)

After you have created each gerber file, you should always look at them using a Gerber viewer to make sure everything is ok.

Summary

This Gerber tutorial shows one way of creating the files you need. Even though this should be OK for many PCB manufacturers, you might find that some would want the files created in a slightly different way. If so, don’t worry, they will probably provide you with a Job file you can load directly into Eagle or at least have a good explanation on how to do it on their website.

Check out more articles on PCB design by clicking this link:
Return from Gerber File to PCB Design