Translating Multiple Layers with Batch Files

Artwork has completed writing a script for the DXF to Gerber translator which will allow the user to translate multiple layers in a batch file; every layer will be outlined with a specific aperture.

Here are the files you will need to create - (the following example was created for 3 layers).

For each layer you will need to have the following files: aperture file (.apt), a list file (.lst), and a resource file (.rsp)

Here is what is in the files:

1. Aperture file: LAYER2.APT

APTUNITS INCH
FORMAT 3.4
SUPPRESS LEADING
SUPPRESS CR
CIRCULAR on
GBR_END M02
LINK off
TEXT D10
LINE d10
MSCALE 1.0
ARCRES 6
REMOVE_HATCH off
FLOATZERO on
FONT C:\Program Files\ACAD2000\FONTS\txt.shx
FONTDIR C:\Program Files\ACAD2000\FONTS
CIRANG 360
ABSOLUTE on
REMOVE_DIM off
PEND 0
FLASH on
FTEXT 50
D10 0.0020000 d Round 0.0020000 0.0000000
D11 0.0030000 d Round 0.0030000 0.0000000
D12 0.0040000 d Round 0.0040000 0.0000000

The aperture file will be the same for all layers. The only difference is the two keywords:

TEXT D10
LINE d10

Each aperture file will point to a different Dcode.

2. Resource file : 2.RSP

"C:\junk\500\batch\Test.dxf" INCH 0.002 "@C:\junk\500\batch\2.LST" 1.0 -z 
-nlnk -t1 -on10,10 -c:0 "-cfg:C:\junk\500\batch\Layer2.apt"

One line with the DXF file name, the list file name, the Outline on10,10 to tell the program to outline anything on the layer with the specified aperture, and the aperture file name.

You will need a separate .RSP file for each layer (just like with the aperture files).

3. List file : 2.LST

"2mils" "C:\junk\500\batch\2mils.gbr"

In quotes you list the layer name in the DXF file and the output gerber file name for that layer.

You will need a separate .LST file for each layer (just like with the aperture and resourse files).


So as you see, each aperture size will have 3 files associated with it.

Once these files are ready, you can create your batch file which may look like this for our 3 layer example:

"c:\WCAD\ASM500\DXF2GBR.EXE" "@C:\junk\500\batch\2.rsp" 0
"c:\WCAD\ASM500\DXF2GBR.EXE" "@C:\junk\500\batch\3.rsp" 0
"c:\WCAD\ASM500\DXF2GBR.EXE" "@C:\junk\500\batch\4.rsp" 0

Each line on the batch file runs one layer. At the end of the batch file, we will have 3 gerber files.

These files can be all loaded to GBRVU and viewed. If it looks to your satisfaction, you can merge them to one gerber file right in the viewer.

Go to Tools | Film Merge and create a film name. Then select all the layers to be merged into that film (as we explained in the web page application note).

That's all.

Below is a link to a zip file which contains all the files you need for this example. Remember to run it in a directory called c:\junk\500\batch and we assume the software is in c:\wcad\asm500.

502_batch.zip

You can change the path in the files and put all the data in a directory of your choice..



ARTWORK CONVERSION SOFTWARE, INC.       Company Profile
417 Ingalls St., Santa Cruz, CA 95060    Tel (831) 426-6163     Fax 426-2824    email: info@artwork.com