Running the GBR2DXF Engine

The GBR2DXF program has two parts - a user interface (GUI) that collects the information about the translation and an engine that actually does the conversion. If you wanted to run GBR2DXF from another program you can call the engine directly. To do so, you must know the correct command line syntax and also what resource files must be produced in advance of calling the engine.

Command Line Syntax

1. Generate Artwork job and aperture file from RS274X Gerber File

   c:\DIR\rs274xjb.exe c:\tmp\

   This will generate the job file, demo.job, the aperture file, demo.apt and possibly a set of macro files, rs274mac.* if the 274X file contains aperture macro definitions.  These macro files are referenced by the aperture and are necessary for translation. After running rs274xjb.exe, refer to sections 2. and sections 3. for further control settings your application may wish to modify in the job and aperture files.

If you are dealing with RS274D, then your application will have to generate the .job and .apt file on its own. The guidelines for the Job and Apt files are shown below.

2. Generate Artwork job file for RS274D Standard Gerber

   Example of a job file





This job contains 2 layers, layer1 and layer2 where layer1 is gerber file c:\tmp\1.gbr and layer2 is c:\tmp\2.gbr.  The aperture file used for this job is c:\tmp\1.apt as specified in aptfile.  The DXF output unit is dxfunit=INCH and output to dxffile=c:\tmp\1.dxf.  The color in the DXF output for each gerber file is defined in dxfcolor=1 and dxfcolor=2.

Note:the dxfcolor line is not generated automatically by the rs274job.exe program but your application could add it in manually if you need to control the DXF layer color.

Generating APT file for RS274D Standard Gerber

This can be problematic if you are accepting RS274D files from a variety of sources since there is no agreed upon format for the aperture information. Therefore it may be necessary to provide the actual use with a menu system that collects this information and then creates the .apt file.

Aperture File Example

APTUNITS inch                -- Gerber and aperture unit
FORMAT 2.4                   -- Format of the gerber file
SUPPRESS LEADING             -- Data in gerber file are leading zero suppressed
SUPPRESS TRAILING            -- Data in gerber file are trailing zero suppressed

CIRANG 90                    -- Data in gerber file are circular 90 mode.
CIRANG 360                   -- Data in gerber file are circular 360 mode.

ABSOLUTE on                  -- Data in gerber file are in absolute mode.
ABSOLUTE off                 -- Data in gerber file are in incremental mode.

PEND 0                       -- Output DXF in connectivity mode.
PEND 1                       -- Output DXF in graphics mode
                                (also need -we in the command line).

FLASH on                     -- Solid and Block flashes.
FLASH off                    -- Solid and Explode flashes.
FLASH on2                    -- Outline and Block flashes.
FLASH tff                    -- Outline and Explode flashes.

CIRCULAR on                  -- Always fixed.
GBR_END M02                  -- Always fixed.

D10 0.0000000 d Round 0.00100000 0.00100000  -- Dcode 10 is a round.
D11 BLOCK11 f Rect 0.03000000 0.02000000     -- Dcode 11 is a rectangle
                                                and output to a block in DXF
                                                as BLOCK11.

Note: PEND and FLASH are also needed for RS274X gerber file.

Running the Engine

Assuming that you have correctly created the .job and .apt (and .mac files if coming from RS274X) then you are ready to launch the translation engine. The command line is shown in two lines for clarity but of course, you should not do so.

c:\wcad\asm500\gbr2gdxd.exe "-cfg:c:\tmp\demo.apt" "-out:c:\tmp\demo.dxf"

-f "c:\tmp\demo.job" [-s:Scale] [-we] <-cir+|-cir-> [-r14]
where   -cfg:     specify aperture file.

        -out:     specify the DXF output file name.

        -f        the job file. (the job file contains the name of 
                  the Gerber file(s) to process)

        -s:Scale  Scale is a conversion factor depending on the 
                  input and output unit.

                     INCH to INCH   not necessary
                     MM   to MM     not necessary
                     INCH to MIL    -s:1000.0
                     INCH to CM     -s:2.54
                     INCH to MM     -s:25.4
                     INCH to UM     -s:25400.0
                     MM   to INCH   -s:0.03937
                     MM   to MIL    -s:39.37
                     MM   to CM     -s:0.1
                     MM   to UM     -s:1000.0

           -we       is graphics mode which the DXF output looks the
                     same as the gerber input.default is connectivity mode.

           -cir+     is output circle as circle in DXF.

           -cir-     is output circle as polyline.

           -r14      is output DXF using release 14 light weight polyline.


The gbr2gdxd.exe engine requires a "license" in order to execute. When it starts up it looks in the same directory where it is installed for a key file called ACS.KEY.

The ACS.KEY file contains a long string of characters (never numbers) that encrypt the program id, the expiration date and also either the hostid of the machine that the program is executed on or alternately, the serial number of the hardware key attached to the machine's parallel port.

A typical ACS.KEY entry might look like:


The keystring above is for a hostid locking; this is indicated by the H at the end of the string. This instructs the engine to read the machine's network card and derive the hostid from the network card's ID.


The keystring above is for a Rainbow Sentinel hardware key locking; this is indicated by the S at the end of the string. This instructs the engine to read Artwork's key attached to the parallel port. Note that for Windows 98/NT/2000/2002 the Rainbow device driver must have been installed or the engine will not be able to detect and talk to the key on the parallel port.


The keystring above is for a floating network license. The application will attempt to contact the lserv license manager and obtain a key from the license manager. If you are going to use this type of security, additional .dlls must be included and the license server must be installed and running. An evironment variable, LSHOST, must have been set which names the machine running the license server.

Data Sheet [1] Data Sheet [2] Data Sheet [3] Price Download Revision History Artwork Home