DXF Layers
WSi writes the CAD representation of cutting and bending work steps as DXF. Every exported entity lies on a layer, and the layer table of the file gives each layer a name and a number (the AutoCAD Color Index, DXF group code 62). Some CAD/CAM systems read the layer name, others the number.
The layer configuration applies to every DXF that WSi exports: the project export, BOM JSON, the Oseon and IT-Blech adapters, and the DXF of a work step.
Default layers
WSi uses seven layers. Each one is named after the AutoCAD Color Index colour of its default number.
| Layer | Default name | Default number | Used for |
|---|---|---|---|
red | RED | 1 | - |
yellow | YELLOW | 2 | Engravings |
green | GREEN | 3 | Bend lines |
cyan | CYAN | 4 | - |
blue | BLUE | 5 | - |
magenta | MAGENTA | 6 | - |
white | WHITE | 7 | Cutting geometry |
Which geometry goes on which layer
- Cutting contours go on the
whitelayer. - Engravings go on the
yellowlayer. - Bend lines go on the
greenlayer. - Imported or multi-colour geometry keeps its colour, so red, green, cyan, blue and magenta entities land on the matching layer. Bend lines therefore share the
greenlayer with imported geometry of that colour.
TIP
BySoft expects the layer name ENGRAVING for engravings. Rename the yellow layer accordingly.
Change layer names and numbers
There is no dialog for this setting. You change the setting dxfLayerConfig in the Console, which is hidden by default and opened from the Windows menu. The call wsi.tables.setting("dxfLayerConfig") returns the current value, or the built-in default when nothing is stored.
| Member | Type | Meaning |
|---|---|---|
red, yellow, green, cyan, blue, magenta, white | Object, optional | Overrides one layer. An omitted member keeps the built-in name and number of that layer. |
name | Text, optional | The new layer name. An omitted name keeps the built-in default. |
number | Integer from 1 to 255, optional | The new layer number. An omitted number keeps the built-in default. |
- Open the Console from the Windows menu.
- Run
wsi.tables.setting("dxfLayerConfig")to see what is stored. - Run
wsi.tables.updateSetting(...)with the layers you want to change. List only those layers. - Run
wsi.tables.commit()to save the change. Without this step, the change only lasts until you close WSi. - Export a DXF again.
The following calls rename the layers for cutting geometry (white), engravings (yellow) and bend lines (green) and save the change.
wsi.tables.updateSetting({
"content": {
"value": {
"white": {
"name": "GEOMETRY",
},
"yellow": {
"name": "ENGRAVING"
},
"green": {
"name": "BENDLINE"
}
}
},
"type": "dxfLayerConfig"
});
wsi.tables.commit();Validation
WSi checks the overrides each time it creates a DXF.
- Numbers are checked one layer at a time and may repeat. A number outside the range 1 to 255 falls back to the default of that layer.
- Names are checked together. A name must be a valid AutoCAD R12 layer name: 1 to 255 printable ASCII characters, no spaces, and none of the characters
<>/\":;?*|=,. All resulting names, including the names of layers you did not change, must be valid and differ from each other, ignoring upper and lower case. If they are, all name overrides take effect. A consistent rename, including swapping the names of two layers, goes through.
WSi reports every rejection as an error in the Messages panel while it creates the DXF.
WARNING
One invalid or colliding name resets every name override to its default. Check the Messages panel after you change names.
See Also
- Export Settings — which files a project export writes
- Oseon Export — the Oseon adapter writes DXF files as CAD references
- IT-Blech Export — the IT-Blech adapter can export DXF files
- Console — where you change the setting
- Messages — where rejected overrides are reported