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 format selection page of the conversion wizard, select the input and output formats and check Batch mode.
- On the Select Batch Files page, add files using Add File… or Add Folder…. For a format that reads several files into one drawing (Gerber, for example), Combine files into single output converts each folder’s files together.
- Configure the import format options.
- Configure the export format options.
- Choose the tools to apply on the Batch Tools page.
- The Batch Conversion page converts the files and lists each file’s result.
Each output file is written beside its input, with the input’s name and the output format’s extension; (2), (3), … is added when a file of that name exists.
Unattended Batch from a Command File
A command file that sets LcConvertBatch=true and skips the file selection takes its files from LcImportFile: a folder stands for every file in it, and a file name may contain the wildcards * and ?. With all steps skipped, the batch runs without a window and LinkCAD exits when it is done:
[LinkCAD]LcLoadDefaults=trueLcConvertBatch=trueLcImportFormat=GDSIILcExportFormat=DXFLcImportFile=C:\designs\*.gdsLcSkipSteps=alllinkcad.exe --config batch.lsn --consoleThe exit code is 1 when no file matches or a file fails to convert. LinkCAD 10 batch command files, which list the batch steps in LcSkipSteps instead of all, work unchanged.
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 --output-format DXF --quitLoop over files (PowerShell)
Get-ChildItem *.gds | ForEach-Object { $out = $_.BaseName + ".dxf" linkcad.exe --import $_.FullName --export $out --output-format DXF --quit --console}Loop over files (cmd)
for %%f in (*.gds) do ( linkcad.exe --import "%%f" --export "%%~nf.dxf" --output-format 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 --output-format DXF --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 --output-format GDSII ` --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