Skip to content

Command-Line Parameters

LinkCAD can be invoked from the command line for batch processing and automation.

linkcad.exe [options] [file]

Input / Output

OptionShortDescription
--import <file>-iInput file path
--export <file>-oOutput file path
--input-format <fmt>Input format (DXF, GDS, CIF, ACIS, etc.)
--output-format <fmt>Output format (DXF, GDS, CIF, ACIS, etc.)

Processing

OptionShortDescription
--layer-map <file>Layer mapping file
--config <file>-cConfiguration/command file
--top-cell <pattern>Top cell pattern for selection
--apply-tool <tools>Apply tool(s); semicolon-separated
--apply-layer-mapApply layer map during processing
--batch-combineCombine files in batch mode
--units <int>-uDisplay units (1–1 000 000)

Control

OptionShortDescription
--quit-qExit when finished processing
--exitExit immediately (testing only)
--consoleEnable console output
--traceEnable TRACE-level logging
--save-settingsSave settings on exit (default)
--no-save-settingsDo not save settings on exit
--load-defaultsReset to default settings before processing

Python

OptionDescription
--python-script <file>Run a Python script and exit (headless)
--python-cmd <code>Execute Python code and exit
--python-interactiveStart interactive Python console (with GUI)

Information

OptionDescription
--helpShow help text
--help-allShow 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:

PrefixArea
DxfIn* / DxfOut*DXF import/export
GdsIn* / GdsOut*GDSII import/export
CifIn* / CifOut*CIF import/export
GbrIn* / GbrOut*Gerber import/export
PsIn* / PsOut*PostScript/PDF import/export
RasterIn*Bitmap import
AcisIn*ACIS import
AnfOut* / TetinOut*ANF / TetGen export
AsciiIn*ASCII import
Tool*Drawing tool parameters
Lv*Viewer settings

See each format page for the full list of available keys.

Drawing Tool Options

These Tool* keys control drawing tool behaviour when invoked via --apply-tool or set in command files.

Arc & Curve Precision

KeyTypeDescription
ToolArcPrecUnitsintPrecision mode — -1=facets, or unit enum (see Units)
ToolArcPrecValueintArc approximation value

Shape Conversion

KeyTypeDescription
ToolConvertArcsflagConvert arcs to polylines
ToolConvertCirclesflagConvert circles to polygons
ToolConvertDonutsflagConvert donuts
ToolConvertDonutsStyleintDonut style — 0=single outline, 1=two halves
ToolConvertSplinesflagConvert splines to polylines
ToolConvertTextflagConvert text to polygons
ToolConvertZeroWidthClosedPolylinesflagConvert closed zero-width polylines to polygons independently of wide polylines
ToolConvertWiresflagConvert wires to polygons

Polygon Handling

KeyTypeDescription
ToolCloseOpenPolygonsflagClose open polygons
ToolAddWidthToPolygonsflagAdd width to zero-width polylines
ToolEraseZeroWidthPolylinesflagErase zero-width polylines
ToolMergeZeroWidthPolylinesflagMerge zero-width polylines
ToolJoinOpenPolygonsflagJoin open polygons
ToolAllowPolylineSpanningflagAllow polyline spanning
ToolEvenOddFillflagUse even-odd fill rule
ToolForceManhattanflagForce Manhattan geometry
ToolSelectionOutlineOnlyflagSelect outline only
ToolSelectionPercentageintSelection tolerance percentage

Holes & Sanitize

KeyTypeDescription
ToolHolesModeintHole processing — 0=link, 1=split, 2=extract
ToolHolesModeLinkflagLink holes
ToolHolesModeOmitLinkflagExtract holes as separate polygons; legacy UI label: Omit cut-lines in re-entrant polygons. See Merge Hole Output Modes
ToolKeepInternalEdgesflagKeep original inner boundaries during Merge Shapes

Tolerance & Width

KeyTypeDescription
ToolPolyToleranceUnitsintTolerance unit enum (see Units)
ToolPolyToleranceValueintPolygon tolerance value
ToolPolyWidthUnitsintWidth unit enum (see Units)
ToolPolyWidthValueintWidth value
ToolErrorMarginfloatError margin multiplier

Quasi-Circle Detection

KeyTypeDescription
ToolQuasiCircleMinFacetsintMinimum facets for detection

Crop

KeyTypeDescription
ToolCropX0floatCrop region X0
ToolCropX1floatCrop region X1
ToolCropY0floatCrop region Y0
ToolCropY1floatCrop region Y1

Etch Compensation

KeyTypeDescription
ToolEtchMergeflagMerge after etch
ToolEtchNegaPosiflagNegative-positive conversion
ToolEtchPitchUmfloatPitch in microns
ToolEtchRangeUmfloatRange in microns
ToolEtchResultLayerMaxintMax result layer
ToolEtchResultLayerMinintMin result layer

Misc

KeyTypeDescription
ToolAutoFlattenflagAuto-flatten hierarchy
ToolDontExplodeflagMerge Shapes option Only merge polygons; legacy UI label: Don’t explode complex shapes

Viewer Options

These Lv* keys control the viewer display. They can be set on the command line or in command files.

KeyTypeDescription
LvDrawFilledflagDraw filled polygons
LvBackgroundColorintBackground — 0=black, 1=white
LvBlendFunctionintBlend mode — 0=opaque, 1=translucent, 2=hatched
LvHiliteBrokenPlinesflagHighlight broken polylines
LvAccellerateflagEnable OpenGL acceleration

Common Cross-Format Options

KeyTypeDescription
TextLineWidthRelfloatText line width as fraction of font size

Units Enum Reference {: #units }

Many options take an integer unit value. The following table lists all supported unit codes:

ValueUnit
0Nanometer
1Micron
2Mil
3Point
4Millimeter
5Centimeter
6Inch
7Meter
8Feet
9Picometer

Examples

Convert GDS to DXF

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

Batch convert with a command file

Terminal window
linkcad.exe --config gds_to_dxf.lsn -i design.gds -o design.dxf -q

Run a Python script headless

Terminal window
linkcad.exe --python-script process.py --console

Apply tools during conversion

Terminal window
linkcad.exe -i input.gds -o output.gds --apply-tool "Merge;SanitizePolygons" -q

Use a command file

Terminal window
linkcad.exe --config my_settings.lsn --console -q

Legacy Options

The following options are deprecated but still accepted for backward compatibility:

LegacyModern 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