How to export layer images at once in Eagle#

Switching layers for traces, drills, and cutout is cumbersome process, so let’s run a script to export layer images at once!

preparation#

Download a file, board_image_export_800dpi.scr at the bottom of the page, and save it to your Eagle script folder.
Script folder is here.

Here’s my version for Mac. You have to specify an existing folder before use it.

#<p>Export TOP and BOTTOM layers in two PNG images with 800 DPI. This includes Pads, Vias and Dimensions.</p>
#<p>Silkscreen layers are exported in other two images for TOP and BOTTOM.</p>
#<p>Top layers are mirrored.</p>

# SET PALETTE WHITE
SET PALETTE BLACK

# image for Traces 
DISPLAY None
DISPLAY 1 17 18 116
# set export location
# Mac
EXPORT IMAGE Users/YourUserName/Desktop/eagle/traces.png MONOCHROME 800;
# Win 
#EXPORT IMAGE EXPORT IMAGE C:\Users\YourUserName\Desktop\traces.png MONOCHROME 800;


# image for Cutout
DISPLAY None
DISPLAY 48
EXPORT IMAGE Users/YourUserName/Desktop/eagle/cutout.png MONOCHROME 800;
# Win
#EXPORT IMAGE EXPORT IMAGE C:\Users\YourUserName\Desktop\cutout.png MONOCHROME 800;

# Image for drills
SET PALETTE WHITE
DISPLAY None
DISPLAY 116
EXPORT IMAGE Users/YourUserName/Desktop/eagle/drills.png MONOCHROME 800;
# Win
#EXPORT IMAGE EXPORT IMAGE C:\Users\YourUserName\Desktop\drills.png MONOCHROME 800;

SET PALETTE BLACK
DISPLAY None
DISPLAY 1 17 18 19 20 21 23 25 27 29 30 31 39 41 44 48 51 116;

BRD > File > Run Script…. Select a script file and run it, which will create 3 images for traces, drills and cutout.

Here’s demo.

reference#