Skip to content

Command-Line Interface

LinkCAD can be driven entirely from the command line for scripted and automated conversions.

Basic Syntax

linkcad.exe [options]

Core Parameters

File I/O

ParameterShortDescription
--import <path>-iInput file path
--export <path>-oOutput file path
--input-format <fmt>Input format; chosen from the input file’s extension when omitted
--output-format <fmt>Output format; required for an unattended conversion, as several formats share an extension (.anf)

Layer Mapping

ParameterDescription
--layer-map <path>Load a layer map file
--apply-layer-mapApply the loaded layer map during conversion

Processing

ParameterShortDescription
--config <path>-cLoad a command file (.lsn format)
--top-cell <pattern>Select the top cell for hierarchical formats
--apply-tool <tools>Apply tools after import (semicolon-separated)
--batch-combineCombine multiple input files into a single output
--units <value>-uDisplay units, as a unit code (0–9)

Control

ParameterShortDescription
--quit-qExit after processing (required for unattended operation)
--consoleEnable console output for logging
--traceEnable detailed TRACE-level logging
--save-settingsSave settings on exit (default behavior)
--no-save-settingsDo not save settings on exit
--load-defaultsReset to default settings before processing

Python

ParameterDescription
--python-script <path>Run a Python script and exit (headless mode)
--python-cmd <code>Execute a Python code string and exit
--python-interactiveOpen the interactive Python console (with GUI)

Information

ParameterDescription
--helpShow help text
--help-allShow all options, including format-specific dynamic options

Unattended Conversion

LinkCAD converts without opening a window, then exits, when it is given:

  • --quit
  • the input file, --import
  • the output file, --export
  • the output format, --output-format; the input format may be left to the file’s extension

Any of them can come from a command file instead (LcExitWhenFinished, LcImportFile, LcExportFile, LcExportFormat). Without all four, LinkCAD opens the conversion wizard with the given values filled in.

The exit code is 0 when the conversion succeeded and 1 when it failed, including an unknown option or a command file that cannot be read.

LinkCAD 10 scripts and command files that set LcSkipSteps=all, or list every wizard step in it, also run unattended and exit when done.

Valid Format Names

Use these names with --input-format and --output-format:

NameImportExport
DXFYesYes
DWGYesYes
GDSIIYesYes
GDS-TXTYes—
CIFYesYes
OASISYesYes
Gerber RS-274XYesYes
ODB++YesYes
SVGYesYes
PostScript/EPSYes—
PostScript—Yes
PDFYes—
ACIS SATYesYes
Parasolid XT—Yes
STEP—Yes
IGES—Yes
ANSYS ANF—Yes
ANSOFT ANF V4—Yes
TETIN—Yes
SonnetYesYes
LASI TLCYesYes
Compass LayoutYes—
Modla—Yes
Binary Die FormatYes—
ASCII DataYes—
Raster Image (Bitmap)YesYes

OASIS import/export and ODB++ import/export require LinkCAD 11 or later. DWG supports both import and export in LinkCAD 11; DWG is not available in LinkCAD 10.

Examples

Simple conversion

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

Conversion with console output

Terminal window
linkcad.exe -i chip.gds -o chip.dxf --output-format DXF --console -q

Conversion with layer map

Terminal window
linkcad.exe -i chip.gds -o chip.dxf --output-format DXF `
--layer-map mapping.lmap --apply-layer-map -q

Select a specific top cell

Terminal window
linkcad.exe -i chip.gds --top-cell "TOPCELL" -o chip.dxf --output-format DXF -q

Apply tools during conversion

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

Run a Python script headless

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

Use a command file

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

Override format-specific options

Terminal window
linkcad.exe -i chip.gds -o chip.dxf --output-format DXF --DxfOutScaling 1000 -q

Use --help-all to see all available format-specific options.

Automation Options

These options control unattended operation and can be set on the command line or in command files. They correspond to Lc* internal key names.

ParameterCommand-File KeyDescription
--load-defaultsLcLoadDefaultsReset to default settings before processing
(command file only)LcSkipImportOptionsSkip the import options dialog
(command file only)LcSkipExportOptionsSkip the export options dialog
-LcSkipSteps <steps>LcSkipStepsWizard steps to skip: all, or step names separated by ;
(command file only)LcSelectTopCellAuto-select the top cell without prompting
-LcConvertBatchLcConvertBatchEnable batch conversion mode
--batch-combineLcBatchCombineFilesCombine multiple files into single output
--apply-layer-mapLcApplyLayerMapApply layer map during processing
(command file only)LcNoRestartDisable automatic restart on crash
(command file only)LcDeleteEmtpyCellsDelete empty cells after import
(command file only)LcDeleteUnresolvedRefsDelete unresolved cell references
(command file only)LcAutoAlternatePolarityAuto-alternate polarity on multi-layer import
(command file only)LcAutoNumberMaterialValuesAuto-number material values
(command file only)LcAutoNumberZValuesAuto-number Z values
(command file only)LcHideUnusedLayersHide unused layers after import
(command file only)LcInResolveLayersResolve layer references during import

Dynamic Options

Format-specific options (e.g., DxfOutScaling, GbrInUnits, GdsOutDbScalingUnits) can be passed directly on the command line using their internal key names. Run linkcad.exe --help-all to see the complete list organized by format.

Each format page lists the available option keys under a “CLI / Command-File Options” section.

Legacy Parameters

LinkCAD also accepts LinkCAD 10 command lines unchanged: any option as -Name=value or -Name value (-LcImportFile=chip.gds, -LcApplyLayerMap true), -i=file, and options that have since been renamed (-LcCropX0). See the CLI Parameters Reference for the full mapping.

Tips

  • An unattended run needs --quit, the input and output files and --output-format; see Unattended Conversion
  • Use --console to see progress and error messages on stdout
  • The input format is chosen from the input file’s extension unless --input-format names it; the output format must always be named
  • Use --no-save-settings in scripts to avoid modifying the user’s defaults
  • A command file can set any option; explicit CLI arguments take precedence over values in the command file