The ASM 3500 translator converts from GDSII to DXF and from DXF to GDSII. The programs consist of two parts: the user GUI which gathers the relevant information and the translation engine which actually does the work.
The GUI collects information such as the file name, output file, and conversion parameters and launches the engine with a command line; it also must build an ascii configuration file for the engine to read.
This app note describes how one would bypass the GUI and launch the engine directly; either from a script, framework or another program.
1. Run gscan.exe to get GDSII File Information
The gscan program "scans" the GDSII file and extracts all sorts of information needed by the converter including a list of structures, the structure hierarchy, and a list of layers with data. The output from gscan is an ascii file ending in the suffix .ssn. GSCAN must be run prior to running the gds2dxf translation engine because you will be referencing the scan file when launching the engine.
The gscan command line
gscan.exe <input file> <-max:max structures> -sh -sea -elmcnt -dtp <-o:output file> where input_file is the GDSII input file name. use double quotes if the path or name has spaces in it. -sh show hierarchy -sea calculate structure extents -elmcnt calculate number of elements per structure -max:max is the maximum number of structures. default = 8192. -o:output file the scan output file name. it should be built in the form: <input_file_name>.ssn.
C:\wcad\asm3500\gscan.exe demo1.gds -sh -sea -o:demo1.ssn
To see the contents of a scan file click here
2. Create the Configuration File
The g2d engine reads an ASCII configuration file that contains layer mapping information and also translation controls. There are quite a few options, so details are available on the configuration page. A sample configuration file is shown below:
gds.cfg ACADUNIT 1000 UM GDSUNIT 1000 UM SCALE_FACTOR 1.000000 TEXT_FONT txt txt txt txt TEXT_STYLE STANDARD STANDARD STANDARD STANDARD
3. Run the g2d.exe Engine
The syntax for running the translation engine is shown below:
c:\wcad\asm3500\g2d.exe demo1.gds demo1.dxf TOPMOSTST -i:3,5,9,10,12 -cfg:gds.cfg -scan:demo1.ssn where "c:\wcad\asm3500\g2d.exe" the full path to the translation engine. You need to double quote this if there are spaces in the paths or file names. "demo1.gds" the input GDSII stream file to convert. (suffix need not be .gds) If no path is specified, the program looks in the current directory for the file. "demo1.dxf" the name (and path) of the output DXF file. TOPMOSTST name of the structure to use. This can be the top level structure or some lower level structure. Note: structure names are always case sensitive. (You can get a list of all structures from the .ssn file) -i:3,5,9,10,12 list of layers to include. can also use the -x to specify layers to exclude. (layers with data are listed in the file) cfg:gds.cfg the configuration file that controls the translation. -scan:demo1.ssn the name of the scan file to use (generally you have just generated this using gscan.)
Notice that because all files referenced can use a full path name, the required files could be located anywhere on the system.