Running DXF to GDSII In Batch Mode on LINUX/UNIX

Steve DiBartolomeo
created April 8, 2002
revised September 2, 2008


This app note describes how one would bypass the GUI and launch the engine directly; either from a script, framework or another program.

To convert DXF to GDSII execute the dxf2gds engine with the correct command line options and the required resource files. A step by step instruction follows:

Build Up The Configuration File

the dxf2gds engine reads an ASCII configuration file that contains layer mapping information and also translation controls - the default name is called GDS.CFG. There are quite a few options, so details are available on the configuration page.


Run dxf2gds Engine

Here are all the command line options for the dxf2gds engine.

DXF to GDSII 6.40 (rcs 3.915) 01/09/2007 LINUX Key DEMO
(C) 1989-2006 Artwork Conversion Software, Inc.

 dxf2gds [filename] [options]

 where <options> can take on the value of

   [-gds [filename]]  produce GDSII output to this file
   [-nolink] suppresses line/arc linking. [-link] default
   [-deemb] create flat de-embedded output using butting polygons
   [-deemb_cut] create flat de-embedded output using cutlines
   [-nohatch] ignore hatching. [-hatch] default
   [-nodim] ignore dimensions. [-dim] default
   [-lscan [file]] scan for layer info; put output in file[.lyr]
   [-cscan [file]] scan for circle info; put output in file[.cir]
   [-sscan [file]] scan for text style info; put output in file[.stl]
   [-ltscan [file]] scan for linetype info; put output in file[.ltp]
   [-log [filename]] put log information in filename[.log]
   [-llist filename] GDSII layer mapping.
   [-cfg:file] use file as the configuration file.
   [-units <UnitType>] where UnitType is one of inch, mil, m, cm, mm, um.
   [-grid <value>] default 0.001
   [-gap <value>] use value as search radius for linking, i.e. building
                  boundaries. default is input grid.

Note: many of the command line options/directives can also be specified in the GDS.CFG file. If a particular directive appears in both the GDS.CFG file and on the command line, the command line value has precendent.

Providing the User with Info about the DXF File

If you are writing your own GUI, you probably will need to provide the user with a list of the layers present in the DXF file in order that the user can decide whether to translate each layer and how to map from DXF layer names into GDSII layer numbers. To do this, run the engine once with the lscan option. This will create an ascii file that contains the list of input layers.


dxf2gds demo1.dxf -lscan demo1.lyr

Once you have the layer information you can present this to the user and have him decide which layers to include and what the layer mapping should be. You can then prepare the GDS.CFG file prior to running the conversion.

Running the Conversion

Assuming you have properly constructed the GDS.CFG file you can now run the conversion.


dxf2gds demo1.dxf -gds demo1.gds -cfg:GDS.CFG
In this example we convert demo1.dxf and the output file will be demo1.gds.
The settings will be read from the configuration file GDS.CFG.

417 Ingalls St., Santa Cruz, CA 95060    Tel (831) 426-6163     Fax 426-2824    email: