Command-Line Parameters
LinkCAD can be invoked from the command line for batch processing and automation.
linkcad.exe [options] [file]
| Option |
Short |
Description |
--import <file> |
-i |
Input file path |
--export <file> |
-o |
Output file path |
--input-format <fmt> |
|
Input format (DXF, GDS, CIF, ACIS, etc.) |
--output-format <fmt> |
|
Output format (DXF, GDS, CIF, ACIS, etc.) |
Processing
| Option |
Short |
Description |
--layer-map <file> |
|
Layer mapping file |
--config <file> |
-c |
Configuration/command file |
--top-cell <pattern> |
|
Top cell pattern for selection |
--apply-tool <tools> |
|
Apply tool(s); semicolon-separated |
--apply-layer-map |
|
Apply layer map during processing |
--batch-combine |
|
Combine files in batch mode |
--units <int> |
-u |
Display units (1–1 000 000) |
Control
| Option |
Short |
Description |
--quit |
-q |
Exit when finished processing |
--exit |
|
Exit immediately (testing only) |
--console |
|
Enable console output |
--trace |
|
Enable TRACE-level logging |
--save-settings |
|
Save settings on exit (default) |
--no-save-settings |
|
Do not save settings on exit |
--load-defaults |
|
Reset to default settings before processing |
Python
| Option |
Description |
--python-script <file> |
Run a Python script and exit (headless) |
--python-cmd <code> |
Execute Python code and exit |
--python-interactive |
Start interactive Python console (with GUI) |
| Option |
Description |
--help |
Show help text |
--help-all |
Show help text including all dynamic options |
Dynamic Options
Format-specific options can be set on the command line using their internal key names. Use --help-all to list all available options. Common prefixes:
See each format page for the full list of available keys.
These Tool* keys control drawing tool behaviour when invoked via --apply-tool or set in command files.
Arc & Curve Precision
| Key |
Type |
Description |
ToolArcPrecUnits |
int |
Precision mode — -1=facets, or unit enum (see Units) |
ToolArcPrecValue |
int |
Arc approximation value |
Shape Conversion
| Key |
Type |
Description |
ToolConvertArcs |
flag |
Convert arcs to polylines |
ToolConvertCircles |
flag |
Convert circles to polygons |
ToolConvertDonuts |
flag |
Convert donuts |
ToolConvertDonutsStyle |
int |
Donut style — 0=single outline, 1=two halves |
ToolConvertSplines |
flag |
Convert splines to polylines |
ToolConvertText |
flag |
Convert text to polygons |
ToolConvertWires |
flag |
Convert wires to polygons |
Polygon Handling
| Key |
Type |
Description |
ToolCloseOpenPolygons |
flag |
Close open polygons |
ToolAddWidthToPolygons |
flag |
Add width to zero-width polylines |
ToolEraseZeroWidthPolylines |
flag |
Erase zero-width polylines |
ToolMergeZeroWidthPolylines |
flag |
Merge zero-width polylines |
ToolJoinOpenPolygons |
flag |
Join open polygons |
ToolAllowPolylineSpanning |
flag |
Allow polyline spanning |
ToolEvenOddFill |
flag |
Use even-odd fill rule |
ToolForceManhattan |
flag |
Force Manhattan geometry |
ToolSelectionOutlineOnly |
flag |
Select outline only |
ToolSelectionPercentage |
int |
Selection tolerance percentage |
Holes & Sanitize
| Key |
Type |
Description |
ToolHolesMode |
int |
Hole processing — 0=link, 1=split, 2=extract |
ToolHolesModeLink |
flag |
Link holes |
ToolHolesModeOmitLink |
flag |
Omit link in holes |
ToolKeepInternalEdges |
flag |
Keep internal edges |
Tolerance & Width
| Key |
Type |
Description |
ToolPolyToleranceUnits |
int |
Tolerance unit enum (see Units) |
ToolPolyToleranceValue |
int |
Polygon tolerance value |
ToolPolyWidthUnits |
int |
Width unit enum (see Units) |
ToolPolyWidthValue |
int |
Width value |
ToolErrorMargin |
float |
Error margin multiplier |
Quasi-Circle Detection
| Key |
Type |
Description |
ToolQuasiCircleMinFacets |
int |
Minimum facets for detection |
Crop
| Key |
Type |
Description |
ToolCropX0 |
float |
Crop region X0 |
ToolCropX1 |
float |
Crop region X1 |
ToolCropY0 |
float |
Crop region Y0 |
ToolCropY1 |
float |
Crop region Y1 |
Etch Compensation
| Key |
Type |
Description |
ToolEtchMerge |
flag |
Merge after etch |
ToolEtchNegaPosi |
flag |
Negative-positive conversion |
ToolEtchPitchUm |
float |
Pitch in microns |
ToolEtchRangeUm |
float |
Range in microns |
ToolEtchResultLayerMax |
int |
Max result layer |
ToolEtchResultLayerMin |
int |
Min result layer |
Misc
| Key |
Type |
Description |
ToolAutoFlatten |
flag |
Auto-flatten hierarchy |
ToolDontExplode |
flag |
Don't explode arrays |
Viewer Options
These Lv* keys control the viewer display. They can be set on the command line or in command files.
| Key |
Type |
Description |
LvDrawFilled |
flag |
Draw filled polygons |
LvBackgroundColor |
int |
Background — 0=black, 1=white |
LvBlendFunction |
int |
Blend mode — 0=opaque, 1=translucent, 2=hatched |
LvHiliteBrokenPlines |
flag |
Highlight broken polylines |
LvAccellerate |
flag |
Enable OpenGL acceleration |
| Key |
Type |
Description |
TextLineWidthRel |
float |
Text line width as fraction of font size |
Units Enum Reference
Many options take an integer unit value. The following table lists all supported unit codes:
| Value |
Unit |
| 0 |
Nanometer |
| 1 |
Micron |
| 2 |
Mil |
| 3 |
Point |
| 4 |
Millimeter |
| 5 |
Centimeter |
| 6 |
Inch |
| 7 |
Meter |
| 8 |
Feet |
| 9 |
Picometer |
Examples
Convert GDS to DXF
linkcad.exe --import chip.gds --export chip.dxf --quit
Batch convert with a command file
linkcad.exe --config gds_to_dxf.lsn -i design.gds -o design.dxf -q
Run a Python script headless
linkcad.exe --python-script process.py --console
linkcad.exe -i input.gds -o output.gds --apply-tool "Merge;SanitizePolygons" -q
Use a command file
linkcad.exe --config my_settings.lsn --console -q
Legacy Options
The following options are deprecated but still accepted for backward compatibility:
| Legacy |
Modern Equivalent |
--LcImportFile |
--import |
--LcExportFile |
--export |
--LcImportFormat |
--input-format |
--LcExportFormat |
--output-format |
--LcLayerMap |
--layer-map |
--LcCommandFile |
--config |
--LcTopCellPattern |
--top-cell |
--LcDisplayUnits |
--units |
--LcSaveSettings |
--save-settings |
--LcExitWhenFinished |
--quit |
--LcExitImmediately |
--exit |
--LcConsoleMode |
--console |
--LcBatchCombineFiles |
--batch-combine |
--LcApplyLayerMap |
--apply-layer-map |
--ToolApply |
--apply-tool |
--LcLoadDefaults |
--load-defaults |