Skip to content

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.

LayerDefault nameDefault numberUsed for
redRED1-
yellowYELLOW2Engravings
greenGREEN3Bend lines
cyanCYAN4-
blueBLUE5-
magentaMAGENTA6-
whiteWHITE7Cutting geometry

Which geometry goes on which layer ​

  • Cutting contours go on the white layer.
  • Engravings go on the yellow layer.
  • Bend lines go on the green layer.
  • 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 green layer 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.

MemberTypeMeaning
red, yellow, green, cyan, blue, magenta, whiteObject, optionalOverrides one layer. An omitted member keeps the built-in name and number of that layer.
nameText, optionalThe new layer name. An omitted name keeps the built-in default.
numberInteger from 1 to 255, optionalThe new layer number. An omitted number keeps the built-in default.
  1. Open the Console from the Windows menu.
  2. Run wsi.tables.setting("dxfLayerConfig") to see what is stored.
  3. Run wsi.tables.updateSetting(...) with the layers you want to change. List only those layers.
  4. Run wsi.tables.commit() to save the change. Without this step, the change only lasts until you close WSi.
  5. Export a DXF again.

The following calls rename the layers for cutting geometry (white), engravings (yellow) and bend lines (green) and save the change.

js
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 ​