ODB to Gerber Web page header

ODB2GBR Sample Code

The odb2gbr.exe sample opens a ODB++ file or directory, lists the steps and layers and then converts the selected step and layer(s) to Gerber files. This sample exercises all of the key API calls for ODB2GBR.DLL.

The source and MS project files for odb2gbr.exe are located in the <install_root>\lib and <install_root>\src directories so that a library user has example code to reference. A fully compiled odb2gbr64.exe is also included with the release.

User Interface

The user interface includes:


odb2gbr sample program main window

After defining the appropriate directory and input file, one presses the Open ODB File button. This causes the program to open the file and then to scan it for the steps and layers.

The list of steps and layers is filled in on the right hand side.

To create Gerber output the user must select a step (it is only possible to select one of the listed steps) and one or more layers. Then press the Convert ODB to Gerber button and the Gerber files are written to the specified output directory.


odb2gbr sample program main window with selected step/layer

To check the results, first we open an ODB++ file using the Valor/Mentor ODB++ Viewer. This is our reference.


The top layer of the ODB++ file.

Next, we open the Gerber file generated by ODB2GBR called top.gbr using Artwork's GBRVU


View of the Gerber file, top.gbr, generated by ODB2GBR64