Batch Mode
Batch mode converts multiple files in a single operation using the same format and option settings.
Using Batch Mode in the GUI
- On the initial format selection page of the conversion wizard, check Batch Conversion.
- Select the input and output formats as usual.
- Configure the import format options.
- Configure the export format options.
- On the batch files page, add files using Add Files or Add Folder.
- 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
linkcad.exe --import chip.gds --export chip.dxf --quitLoop 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 group | Command-file key | Description |
|---|---|---|
| Merge Overlapping | LcBatchToolsMerge | Merge overlapping shapes on each layer |
| De-embed | LcBatchToolsDeembed | Remove embedded polygons |
| Convert to Outline | LcBatchToolsOutline | Convert selected shape types to polygon outlines |
| Detect quasi-circles | LcBatchToolsQuasiCircles | Convert 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-option | Key | Description |
|---|---|---|
| Polylines with width | ToolConvertWires | Convert non-zero-width polylines/wires to polygon outlines |
| Zero-width closed polylines | ToolConvertZeroWidthClosedPolylines | Convert closed zero-width polylines to polygons independently of wide polylines |
| Circles | ToolConvertCircles | Convert circles to polygons |
| Donuts | ToolConvertDonuts | Convert donuts using the selected donut style |
| Donut style | ToolConvertDonutsStyle | 0 = Single Outline, 1 = Half Donuts |
| Text | ToolConvertText | Convert text to polygons |
| Arc Precision | ToolArcPrecValue, ToolArcPrecUnits | Precision 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:
linkcad.exe -i input.gds -o output.gds ` --apply-tool "Merge;Deembed" --quitTips
- Use
--consolein scripts to see per-file progress and errors - Use
--no-save-settingsto 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