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
| Field | Required | Description |
|---|---|---|
$schema |
Schema URL for editor validation | |
version |
Schema version (must be 1) |
|
units |
Unit for elevation and thickness values — nm, pm, um, mil, point, mm, cm, in, m, ft |
|
layer_map |
yes | Array of layer mapping entries |
Entry Fields
| Field | Required | Type | Description |
|---|---|---|---|
input_layer |
yes | string | Source layer identifier |
output_layer |
string | Target layer identifier | |
order |
integer | Display order (JSON only — not available in CSV) | |
comment |
string | Description or note | |
color |
string | Layer color — hex (#FF0000) or X11 name (Red) |
|
visibility |
boolean | Whether the layer is visible | |
elevation |
number | Z-coordinate, scaled by units (not allowed when stack is true) |
|
thickness |
number | Layer thickness, scaled by units |
|
material |
integer | Material index | |
extrude |
boolean | Whether to extrude this layer in 3D export | |
stack |
boolean | Stack layers automatically (mutually exclusive with elevation) |
Tip
The JSON format supports order for controlling layer display order, which is not available in CSV layer maps.
CSV Format
CSV layer maps are plain-text files with comma or semicolon delimiters. Each row defines one layer mapping.
Columns
| # | Column | Description |
|---|---|---|
| 1 | input_layer |
Source layer identifier (required) |
| 2 | output_layer |
Target layer identifier |
| 3 | comment |
Description or note |
| 4 | color |
Layer color — hex or X11 name |
| 5 | visibility |
true or false |
| 6 | elevation |
Z-coordinate in database units (picometers) |
| 7 | material |
Material index |
| 8 | extrude |
true or false |
| 9 | stack |
true or false |
| 10 | thickness |
Layer 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
| Feature | JSON | CSV |
|---|---|---|
order field |
yes | no |
| Unit scaling for elevation/thickness | yes | no (always picometers) |
| Schema validation | yes | no |
| Structured metadata | yes | no |
Merging Layers
Map multiple source layers to the same target to merge them:
Filtering Layers
Only layers listed in the map are included in the output. Unlisted layers are dropped.
Using Layer Maps
GUI
- Load a layer map from the Layer Map panel
- Assign mappings by editing the table
- Apply during conversion
Command Line
Python
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