Skip to content

Layer Maps

Layer maps define how layers are renamed, renumbered, merged, or filtered during conversion. They are especially useful when converting between formats with different layer conventions (e.g., GDSII numeric layers to DXF named layers).

LinkCAD supports two layer map file formats: JSON (recommended) and CSV.

JSON Format

JSON layer maps use a schema-validated format with richer metadata. This is the recommended format for new projects.

{
"$schema": "https://schema.linkcad.com/layer-map-v1-schema.json",
"version": 1,
"units": "um",
"layer_map": [
{
"input_layer": "METAL1",
"output_layer": "M1",
"order": 1,
"comment": "Metal 1 layer",
"color": "#FF0000",
"visibility": true,
"elevation": 1000,
"thickness": 500,
"material": 3,
"extrude": true
},
{
"input_layer": "VIA1",
"output_layer": "V1",
"order": 2,
"color": "Blue",
"stack": true,
"thickness": 200
}
]
}

Root Fields

FieldRequiredDescription
$schemaSchema URL for editor validation
versionSchema version (must be 1)
unitsUnit for elevation and thickness values — nm, pm, um, mil, point, mm, cm, in, m, ft
layer_mapyesArray of layer mapping entries

Entry Fields

FieldRequiredTypeDescription
input_layeryesstringSource layer identifier
output_layerstringTarget layer identifier
orderintegerDisplay order (JSON only — not available in CSV)
commentstringDescription or note
colorstringLayer color — hex (#FF0000) or X11 name (Red)
visibilitybooleanWhether the layer is visible
elevationnumberZ-coordinate, scaled by units (not allowed when stack is true)
thicknessnumberLayer thickness, scaled by units
materialintegerMaterial index
extrudebooleanWhether to extrude this layer in 3D export
stackbooleanStack layers automatically (mutually exclusive with elevation)

CSV Format

CSV layer maps are plain-text files with comma or semicolon delimiters. Each row defines one layer mapping.

Columns

#ColumnDescription
1input_layerSource layer identifier (required)
2output_layerTarget layer identifier
3commentDescription or note
4colorLayer color — hex or X11 name
5visibilitytrue or false
6elevationZ-coordinate in database units (picometers)
7materialMaterial index
8extrudetrue or false
9stacktrue or false
10thicknessLayer thickness in database units

Example

METAL1,M1,Metal 1 layer,#FF0000,true,1000,3,true,false,500
VIA1,V1,,Blue,true,,,,false,200
POLY,P1,,#FFFF00,,,,,,

Fields may be quoted. Both comma and semicolon separators are accepted.

JSON vs. CSV

FeatureJSONCSV
order fieldyesno
Unit scaling for elevation/thicknessyesno (always picometers)
Schema validationyesno
Structured metadatayesno

Merging Layers

Map multiple source layers to the same target to merge them:

1,METAL
2,METAL
3,METAL

Filtering Layers

Only layers listed in the map are included in the output. Unlisted layers are dropped.

Using Layer Maps

GUI

  1. Load a layer map from the Layer Map panel
  2. Assign mappings by editing the table
  3. Apply during conversion

Command Line

Terminal window
linkcad.exe -i chip.gds -o chip.dxf `
--layer-map mapping.csv --apply-layer-map --quit

Python

import linkcad.plugin as lp
# Layer maps can be applied programmatically in tool plugins

Tips

  • Layer maps can be created from the GUI and saved as CSV for reuse
  • Use consistent layer naming conventions across projects
  • The map file encoding should be UTF-8
  • See Layers for more on layer management