Configuration File for GDS2DXF/DXF2GDS

Steve DiBartolomeo
Applications Manager, Artwork Conversion


Both the gds2dxf and dxf2gds engines read the GDS.CFG file. In order to run these engines without using the GUI your application or script must construct a valid .cfg file.

Basic .CFG File Syntax

The GDS.CFG file consists of a series of keyword lines followed by data. The data may be an ON | OFF directive or may contain directory locations, or values. The keywords should be in UPPER CASE and should always start in column 1 of the line. There should be no blank lines between a keyword and its data because a blank line signifies that the data for a particular keyword has ended.

Artwork's translation engine ignores any keywords and data that it does not recognize. The table below summarizes the directives and data associated with each one.

- X tells dxf2gds how much resolution to use when scanning a DXF file.
- X tells dxf2gds what units to write into the GDSII file header and how much resolution to write data to.
SCALE_FACTOR 1.0 X X Used to scale data up and down. DXF2GDS: You do not need to account for different units if the AUTOSCALE parameter is set to ON. GDS2DXF: AutoScale is not functional and you must use this to scale units. (i.e if going from UM to MM set this value to 1000)
AUTOSCALE ON | OFF - X If ON, automatically scales data to account for different units. For example, if your DXF data is in MM and your GDSII data is in UM and AUTOSCALE=ON a scale factor of 1000 would be applied -- each MM value is mutliplied by 1000 to get UM in GDSII and each GDSII value is divided by 1000.
MAXERR 100 X X used to limit the maximum number of error messages in the log file.
MAX_POINT 200 - X Sets the maximum number of points per boundary or path. The GDSII default=200 but many systems support larger values. Do not exceed 4096. This parameter only affects the DXF2GDS direction.
ARCRES 9.0 - X When going from DXF to GDSII arcs and circles must be fractured. This value defines the number of degrees that the chord will span. Valid range from 1.5 to 45; typical is 6 to 9 degrees
ARCSAG 0.0 - X When going from DXF to GDSII arcs and circles must be fractured. This value the maximum "difference" between the true arc and the approximated arc. This gives a "dynamic" fracturing so thta large radius arcs get more segments than small radius arcs. If set to 0, this parameters is disabled.
MIN_LINE 0.0 - X When going from DXF to GDSII, lines with zero width would normally be mapped to paths with zero width. However some GDSII tools crash when importing a path with zero width. This command will reset any paths to a minimum width defined in the parameter. For example, if MIN_LINE=0.5 then a 0 width or a 0.25 width line in DXF would become a 0.5 width line in GDSII.
INCLUDE list of
layer or
to convert
- X defines a list of AutocAD layers that should be translated. For example,:
indicates that layers 0, metal1,poly and implant should be converted -- even if there are many other layers with data in them. One cannot have data in an INCLUDE line and also in the EXCLUDE line as they are mutually exclusive. This only works in DXF2GDS direction. For GDS2DXF use command line argument -i.
EXCLUDE list of
layer or
not to
- X defines a list of layers (or layers:datatypes) that should not be translated. For example,:
indicates that layers 59 and 63 should not be converted -- all other layers will be converted. This command is made available as it is sometimes easier to define what not to convert that what should be converted. It cannot be used simultaneously with INCLUDE.
MAX_LAYER 64 - X defines the "maximum" GDSII layer number. For standard GDSII, this value is 63 but many CAD systems now support much higher values. Set it to the maximum layer number you want the translator to support. Note: in DXF to GDSII, should you have more than the maximum number of layers, the translator will use modulo [max_layer] to assign layer numbers to those that exceed the max.
ERROR_LAYER -1 - X When going from DXF to GDSII any lines that don't form closed boundaries will be sent to the error layer, making it easy to inspect and determine if there were problems in the source data. If the value is set to -1 then such data is discarded.
LINK_MODE ON | OFF - X When going from DXF to GDSII any lines and arcs can be connected to form closed areas if LINK_MODE=ON. if LINK_MODE=OFF then no attempt is made to link lines/arcs.
GDSQUALIFY ON | OFF - X When ON, this instructs the program to check every boundary output to GDSII for validity: i.e. it may not self-intersect, it may not fold back on itself, it may not have less than 3 vertices. Generally, if LINK_MODE=ON then GDSQUALIFY should also be ON.
X X OUTLINE- converts a path with width (or a polyline with width) into an outline by calculating the "area" covered by the path. If outline, then the directive MITER also has effect.

LWEIGHT - preserves the width/path properties if possible. Note: AutoCAD polylines can change width; such a polyline will always be converted to a boundary when going to GDSII.
MITER ON | OFF X X when converting a path width width to an outline, if MITER=ON, the translator will trim sharp corners where the path bends. If MITER=OFF the sharp corner will remain.
MAP_CIRCLES ON | OFF X - GDSII has no circle entities; a circular pad would be approximated by a polygon with many equal sides. The GDS2DXF engine can be instructed to recognize such approximations and convert them into circles in AutoCAD DXF if this option is turned on.
REMOVE_HATCH ON | OFF - X When going from DXF to GDSII hatch lines that are part of hatch blocks (*x) will be ignored if REMOVE_HATCH=ON. We recommend that REMOVE_HATCH normally be set to ON.
REMOVE_DIM ON | OFF - X When going from DXF to GDSII all dimension blocks (*d) will be ignored if the keyword REMOVE_DIM=ON. We recommend that this be set to ON for normal operation.
LAYER 0 0 1
M1 19 2
VIA12 20 2 3
M2 21 4
VIA23 22 5
M3 23 6
VIA34 24 5
M4 31 7
DIST 35 6
X X controls the mapping of DXF layer names to GDSII layer numbers1. Note that layer 0 must always be mapped to layer 0 in AutoCAD.
Column 1 = DXF Layer Name
Column 2 = GDSII Layer Number
Column 3 = DXF color number
There may not be any empty lines in the list of layers or the program will assume that the data is complete.

Text Controls
X X When going from DXF to GDSII the height of a string of text is divided by this value. There must be 4 entries: one each for fonts 0,1,2,3. In the reverse direction, from GDSII to DXF the magnitude of the text is mulitplied by this value. (A round trip from DXF to GDSII will generate consistent text heights.) This value is available because the GDSII stream file lacks information about the font height.
BLOCK_TEXT ON | OFF - X represents text as path or outline for apps which don't support text entities. See PATH_FONT for additional controls.
c:\txt.shx FLUSH OUTLINE
c:\txt.shx FLUSH OUTLINE
c:\txt.shx FLUSH OUTLINE
X X if BLOCK_TEXT is ON, then this controls how the text is built. the first argument is the font file to use. The second argument FLUSH or ROUND determines whether the end of the stroke is square flush or rounded. The third argument, OUTLINE tells the program to not use path width width and instead create an outline boundary.
X - maps the GDSII fonts 0,1,2,3 to AutoCAD fonts.
X - if specified, gives the user control on mapping the GDSII fonts to the AutoCAD styles. If not present defaults to standard style.

New Layer Mapping Functionality

Starting with v6.73 on Linux (not on Windows) datatype discrimination has been added using the .cfg file.

where before only layers could be specified, now using the colon ":" character one can specify a layer/datatype combination.

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