Skip to main content

Import

scalesFor

Every scale offered for a unit system — the list a scale picker renders.

scaleById

Look a registered scale up by the id stored in Viewport.scaleId.

nearestStandardScale

The registered scale matching a ratio in a given system, if there is one.

METRIC_SCALES

ISO 5455 reductions plus the enlargements, and the intermediate architectural scales (1:25, 1:1250, 1:2500) that practice uses alongside them.

IMPERIAL_SCALES

mmToPdfPoints

Millimetres → PDF points (1 pt = 1/72 inch).

pdfPointsToMm

PDF points → millimetres.

mmToScreen

Millimetres → screen pixels at a given pixels-per-mm zoom.

screenToMm

Screen pixels → millimetres at a given pixels-per-mm zoom.

Types

NamedScale

A scale a drawing is plotted at, as both a ratio and the way it is written.
string
required
Stable key stored in Viewport.scaleId, e.g. “1:50” or “1/4in=1ft”. Written out rather than derived from the label, so it stays readable and cannot collide as the ladder grows.
string
required
How the scale is written on the sheet.
number
required
Dimensionless paper ÷ real ratio. 1:50 → 0.02.
UnitSystem
required
Last modified on October 6, 2026