Skip to main content
Level is a live datum in the 3D scene. It is not saved in the project file, and it does not draw on a sheet or in drawProjectView. Use it to show a level while you model. The storeys are the levels of the floors. To save an extra datum level, add a level to BmBuilding.levels: an id, a name and an elevation in metres above the world origin. Edit the list with the add-building-element, replace-building-element and remove-building-element commands, as you edit grids. drawProjectView draws the levels:
  • A section or an elevation draws a level head for each storey and each saved level inside its vertical crop: a dash-dot line from the right edge of the drawn buildings (not the ground line or the site boundary) to 5 paper mm past it, never across a building, and, there, a filled triangle with the elevation (+3.000) and the name at its right. The head keeps its paper size at any sheet scale and never crosses the model; it can lie right of the crop, and the drawing bounds grow to hold it, so a viewport centred on the drawing shows it. Storeys and levels at the same elevation share one head. Names equal but for case print once; different names join with /. A storey with no name adds no name; a head with no name prints its elevation only. On a sheet, a viewport with no viewCenter centres the drawing with its level heads at the viewport scale, and fitViewportScale takes a scale only when the heads fit too. With settings.levelLabels, the elevation is measured from its datum and given in its unit, such as +3.200 m.
  • A section or an elevation also draws the levelHeads and heightDimensions the view saves. Each one follows a height of the model: a storey floor or top, a roof’s eaves (the wall plate: where the underside of the roof meets the outer face of the walls it bears on, above the soffit of an overhang; on a flat roof the underside at the wall line), ridge or flat-top (its highest point), a wall base or top, a room floor or ceiling, a saved level, or the ground. The values are read from the model at each draw, so they change when the model changes. A level head prints the elevation and its label, or the name of what it follows, such as Eaves. It sits on the left of the crop by default, clear of the storey level lines, or on the right of the drawn model. Heads at similar heights on one side overlap: give one of them the other side. A height dimension is a vertical line at at metres across the view, with a tick at each end and the length in mm to precision decimals, or its label. A reference that names nothing draws nothing, and the drawing’s warnings name it.
  • A storey plan draws a level mark of its storey only when the building has grids: the same head, with the storey elevation and name (the elevation only for a storey with no name), up and left of the grid ends, outside the drawing. A building with no grids gets no level mark on its plans.
Level names are unique in a building: a second level with the same name is refused with the error code duplicate-label.

Import

Example

Notes

  • In drawProjectView and in a vector viewport on a sheet, a section’s settings.levelLabels sets the datum and unit of the level heads. It draws no separate storey label, since every storey has a head. Only the raster overlay of a physical view (and drawPhysicalLevelLabels called directly) still draws the storey labels at the left of the crop.
  • A live datum lives only in the 3D scene. Save what a drawing must show in the building model or on a sheet.
Inheritance: extends OPElement implements IShape, IPlaceable

Constructor

DatumType.LEVEL
number
World Y elevation.
[number, number]
Start point on the X-Z plane: [x, z].
number
Signed length of the line along local +X (before rotation).
number
Plan-view rotation around the origin, degrees. Default 0.
boolean
Show the label at the start endpoint. Default true.
boolean
Show the label at the end endpoint. Default true.
number
Font size for the OpenGlyph label, in world units. Default 2.5.
string
Override for label text. Falls back to ${labelName} ${formatElevation(elevation)}.
string
The storey this datum displays, when it is bound to one (Building segment storey / BmStorey id). Data only — the level stays a visual datum.
string
string
number
Line / symbol colour. Defaulted per subtype when omitted.
number
Line weight for the datum’s 2D representation.
DatumVisibility
Whether this datum is shown in plan / model views.

Properties

string
string
Map<string, THREE.Object3D>
Map<string, THREE.Object3D>
boolean
boolean
boolean
Event<null>
LevelOptions
string
DatumType
Read-only.
number
boolean
boolean

Methods

editableSchema

move

Translate this element by delta (world-space, meters).

rotate

Rotate this element by angleDeg around axis (default Y-up), pivoted at anchor (default the element’s own centroid).

setOPConfig

getOPConfig

getEditAnchors

Draggable handles: the start origin (free on the floor plane), the far end (slides along the level’s own direction → length), and an elevation grip at the midpoint (vertical).

applyEditAnchor

setOPMaterial

setOPGeometry

Types

LevelOptions

DatumOptionsBase

Common fields shared by every datum subtype.
string
string
required
DatumType
required
number
Line / symbol colour. Defaulted per subtype when omitted.
number
Line weight for the datum’s 2D representation.
DatumVisibility
Whether this datum is shown in plan / model views.
Last modified on November 16, 2026