Skip to content

Batch Mode

Batch mode converts multiple files in a single operation using the same format and option settings.

Using Batch Mode in the GUI

  1. Start the conversion wizard via File → Open or drag-and-drop
  2. In the format selection page, check Batch Conversion
  3. Select your input and output formats
  4. On the batch files page, add files using Add Files or Add Folder
  5. Optionally check Combine files into single output to merge all input files into one output
  6. Click Convert

Each input file is read, processed (with any enabled tools), and written to the output format. Progress is shown with a progress bar, file name, and file index.

Batch Mode from the Command Line

There is no separate "batch file" format. Instead, use a command file to configure all options, then invoke LinkCAD once per input file:

Single conversion

linkcad.exe --import chip.gds --export chip.dxf --quit

Loop over files (PowerShell)

Get-ChildItem *.gds | ForEach-Object {
    $out = $_.BaseName + ".dxf"
    linkcad.exe --import $_.FullName --export $out --quit --console
}

Loop over files (cmd)

for %%f in (*.gds) do (
    linkcad.exe --import "%%f" --export "%%~nf.dxf" --quit --console
)

Using a command file for shared settings

Get-ChildItem *.gds | ForEach-Object {
    $out = $_.BaseName + ".dxf"
    linkcad.exe --config my_settings.lsn `
        --import $_.FullName --export $out --quit --console
}

The command file sets format options (DXF scaling, GDS units, etc.), while --import and --export override the file paths for each iteration. See Command Files for the file format.

Batch Tools

When batch mode is enabled in the GUI, LinkCAD can apply a set of tools to each file automatically. These are configured on the Batch Tools page of the wizard:

GUI Checkbox Command-File Key Description
Merge overlapping LcBatchToolsMerge Merge overlapping shapes on each layer
De-embed LcBatchToolsDeembed Remove embedded polygons
Outline LcBatchToolsOutline Extract polygon outlines
Detect quasi-circles LcBatchToolsQuasiCircles Convert quasi-circles to true circles

These can be set in command files using their key names. From the command line, use --apply-tool with semicolon-separated tool names:

linkcad.exe -i input.gds -o output.gds `
    --apply-tool "Merge;Deembed" --quit

Combining Files

The --batch-combine flag merges all input shapes into a single output file instead of producing separate files. In the GUI, this is the Combine files into single output checkbox.

Tips

  • Use --console in scripts to see per-file progress and errors
  • Use --no-save-settings to avoid each conversion overwriting the user's saved defaults
  • A command file can pre-set all format-specific options; CLI arguments override values from the command file
  • For very large batches, consider writing a Python script using the Python API for more control over the conversion pipeline