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. On the initial format selection page of the conversion wizard, check Batch Conversion.
  2. Select the input and output formats as usual.
  3. Configure the import format options.
  4. Configure the export format options.
  5. On the batch files page, add files using Add Files or Add Folder.
  6. Perform the conversion.

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

Use a command file to configure all options, then invoke LinkCAD once per input file:

Single conversion

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

Loop over files (PowerShell)

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

Loop over files (cmd)

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

Using a command file for shared settings

Terminal window
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 groupCommand-file keyDescription
Merge OverlappingLcBatchToolsMergeMerge overlapping shapes on each layer
De-embedLcBatchToolsDeembedRemove embedded polygons
Convert to OutlineLcBatchToolsOutlineConvert selected shape types to polygon outlines
Detect quasi-circlesLcBatchToolsQuasiCirclesConvert quasi-circles to true circles

The Convert to Outline group uses the same shape-selection options as Tools → Shape Operations → Explode to Polygons. Its command-file sub-options include:

Sub-optionKeyDescription
Polylines with widthToolConvertWiresConvert non-zero-width polylines/wires to polygon outlines
Zero-width closed polylinesToolConvertZeroWidthClosedPolylinesConvert closed zero-width polylines to polygons independently of wide polylines
CirclesToolConvertCirclesConvert circles to polygons
DonutsToolConvertDonutsConvert donuts using the selected donut style
Donut styleToolConvertDonutsStyle0 = Single Outline, 1 = Half Donuts
TextToolConvertTextConvert text to polygons
Arc PrecisionToolArcPrecValue, ToolArcPrecUnitsPrecision for curve approximation

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

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

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