3 Simple Ways to
Share What You Make

With Instructables you can share what you make with the world — and tap into an ever-growing community of creative experts.

PhotosPhotos

Share one or more photos of a project, recipe, or whatever you've made, quickly and easily.

Step by StepStep-By-Step

Share your step-by-step photos with text instructions of what you made so others can do it too!

VideoVideo

Share your how-to video. You'll need your embed code from a video site such as YouTube.

Automating Eagle export and preparing it for printing.

Automating Eagle export and preparing it for printing.
This is my first instructable and English isn't my primary language so I hope it will be not so bad. There are many instructables for creating boards in Eagle and etching them trough many methods. But this instructable should be just for much faster and automated preparing images of board for printing. I was doing this on GNU/Linux Debian (so don't get confused from different GUI), but should be almost the same for Windows (just you need to edit the pathnames etc...). If it will be hard for somebody doing it on Windows platform I could make another one for Windows.

You need:
Eagle http://www.cadsoft.de/
GIMP (www.gimp.org)
Printer :)

It could be done in some other image editing software, for example in Photoshop. But Photoshop isn't for free and making there automated scripts is too easy and you don't need inscrutables to record action script there.
 
Remove these adsRemove these ads by Signing Up
 

Step 1Eagle

Eagle
«
  • i.jpg
  • i1.jpg
  • i2.jpg
  • i3.jpg
  • !eagle_export.png
  • backups.jpg
When you have your PCB board ready then open your favourite text editor and write there:


DISPLAY ALL
RATSNEST
DISPLAY None
DISPLAY Bottom Pads Vias
EXPORT IMAGE /mnt/slug_common/progs/!8051/!plosaky/!eagle_export.png MONOCHROME 600;
DISPLAY Top Unrouted Dimension tPlace bPlace



You can change the path there (I used this one because I have NSLU2 network drive and exporting directly there makes it accessible from every computer/PDA in my home (and garden as well :) ) ). It's awesome device :)

I saved it in my project folder under name "obraz.scr", you can save it where it is best for you and name it like you want, just keep the ".scr".

Then in Eagle click File -> Script.. Find the location of this script and open it. It will execute the script, it will hide some layers, export it as monochrome PNG image with 600 DPI (you can modify this if you want). You can see the resulting image here. And after exporting showes the layers back. It's great to have it automated because when I'm doing it over and over again, it eats plenty of time and usually I forget to hide some layer and I need it to do it once again. After time it's get very frustrating.

I think when you save this script in Eagles installation directory between others scripts you can execute the script just typing into command line "script obraz;"

Now you can click Options -> Assign and assign the command "script obraz;" with some short-cut, for example Shift+F1. And from this point exporting in Eagle will be super quick.
« Previous StepDownload PDFView All StepsNext Step »
20 comments
May 13, 2011. 2:06 PMfuxx says:
Anton, Gimp scrip doesnt work.
Plug-In 'PCB-Filter' left image undo in inconsistent state, closing open undo groups.
Execution error for 'PCB-Filter':
Error: Procedure execution of gimp-image-convert-grayscale failed on invalid input arguments: Image '!eagle_export_b.png' (5) is already of type 'gray'

On the invert step gives out an error too.
Apr 9, 2011. 3:35 AMrenenijman says:
Hi,
I get 'unknown command' errors in every line. I'm using EAGLE 5.11.0 on Mac. What could be the problem?
Many thanks!
Aug 10, 2010. 5:38 AMgopalyajur says:
Hello, I have two problems. 1. when I use step 1 and run the script, I do get the image file and png. But, in the final image the the tracks are distorted and gets connected randomly. And in the original CAD Board the tracks change when I use the script. 2. What is the use of second step, its it only for editing or directly creating the PCB image. I use windows and do I have to save the script as "SOMENAME.scm"? And where do I click "Xtns" is it in Gimp. Sorry for my basic questions. Thanks in advance.
Aug 11, 2010. 10:33 PMgopalyajur says:
It works and very impressive. Thanks a lot. However, the image is inverted. The tracks are white and the parts to be etched are black. I am not using UV light but, use the chemical etching process. I just had to invert the image and it seems to work.
Aug 12, 2010. 8:13 AMgopalyajur says:
I am just using the script you mentioned in step 1 and did not the one you mentioned in step2. Is it possible to change the script in step 1, so that the final image is inverted which is suitable for chemical etching? To be frank its not clear what I can do with step 2. After converting the CAD file to jpg using gimp I just inverted the circuit and got what I needed. The problem I had before is because I did choose just the not bottom layer but, other layers too.
May 7, 2010. 1:24 PMsolex says:
The dpi seems to  be linked to the img size, so the script makes images larger than they should be, what dpi would keep the resolution?
May 7, 2010. 1:41 PMsolex says:
My mistake, the program I was printing from on my works computer was not respecting the dpi info in the images.
Apr 29, 2010. 2:13 AMlunchweek says:
Is there any way to keep the board size?
Apr 29, 2010. 4:06 AMlunchweek says:
Yeah i just noticed that :) It works like a charm. Thank you!
Apr 1, 2010. 1:24 PMabraxas2 says:
Sorry but I don't understand the path business. If I wanted to store this file in say C:\Electronics\Pic
What would I enter on the path line ?

Pro

Get More Out of Instructables

Already have an Account?

close

All Steps Viewing
View all steps of an Instructable on the same page when you're a Pro Member.

Upgrade to Pro today!
1
Followers
1
Author:truhlik_fredy