Skip to content

File format

A Delinya drawing is a .dln file: JSON text, which you can read in any text editor. It holds the drawing exactly as you made it, and nothing worked out from it.

{
"format": "delinya",
"version": 1,
"doc": {
"entities": {
"rect_k3v9q2": {
"kind": "rect",
"props": { "x": 0, "y": 0, "width": 300, "height": 600, "layer": "layer" }
},
"circle_a81x0p": {
"kind": "circle",
"props": { "cx": 37, "cy": 96, "diameter": 5 }
}
}
}
}
  • format is always "delinya", and version is the format’s version, currently 1. A newer Delinya reads older files; an older one refuses a file from a newer version rather than misread it.
  • doc.entities maps each entity’s ID to its kind and props.

Kinds

KindWhat it is
lineA line: start x, y, length and angle
rectA rectangle: corner x, y, width, height, optional corner radii r and rotation
circleA circle: centre cx, cy and diameter
polylineA path: its nodes and whether it is closed
textA text box: x, y, width, height, text and its style
dimensionA dimension of a shape’s size, with its offset
radius-labelA label on one of a rectangle’s corners
variableA shared value that linked sizes refer to
link.align, link.spacingLive alignment and spacing links
layerA layer: its name, order, colour, and fill and hatch pattern
documentThe title block text and grid spacing

Shapes may also have a layer, a lineWidth and a lineDash, a name, and showName (true to show the name on the drawing).

Units

All lengths are millimetres. x runs right and y runs down, as on the screen; angles are in degrees, clockwise from pointing right. A size linked to a variable is stored as { "ref": "<variable id>" } in place of a number.