createEmptyDocument makes a new one. validateDocument checks one that you read from storage.
Import
Example
Notes
- A new document has no sheets.
- Sheet sizes, margins and positions are in millimetres. The origin is the top-left corner.
- The document is plain JSON data. Your app owns it.
- A sheet can hold a
northArrowand ascaleBarannotation. Each names a viewport on the same sheet inviewportId, which sets its rotation or its scale. - A sheet can hold a
legendannotation: a key with one row per entry. The paper style of the viewport inviewportIddraws each swatch with the fill, hatch, ink and dash of the element it names.{ id: 'key', kind: 'legend', viewportId: 'ground', position: { x: 140, y: 236 }, fontSize: 2.5, title: 'KEY', entries: [{ label: 'New walls', swatch: { ogType: 'WALL', phase: 'new', as: 'region' } }, { label: 'Walls to remove', swatch: { ogType: 'WALL', phase: 'demolished', as: 'line' } }] }draws a key of two rows underKEY. - A saved plan view can set
openingTagsandwallTags('none'or'auto', off when absent),labelMm(paper mm, 1.8 or more),hideStairAboveCut,labelClearance({ markerLines: boolean, gapMm: number },gapMm0 or more; off when absent) androomLabel.minTextMm(paper mm, 1.8 or more). See drawProjectView for what the last two draw. - A roof plan view takes
siteBoundaryLabel,rooflightTagsandopeningTagTextas a plan view does.{ kind: 'roof-plan', id: 'roofs', name: 'Roof plan', buildingId: 'house', showSiteBoundary: true, siteBoundaryLabel: { text: 'Boundary Line', spacingM: 8 }, rooflightTags: 'auto' }repeatsBoundary Linealong each edge of the red line and writes thelabelNameof each rooflight beside it. The label draws only withshowSiteBoundary; without the fields the roof plan draws as before. - A plan view with no
storeyIdis a site plan: the parcel, the dashed setback line and the mass parts of every building. Put it on a sheet like any plan view. validateDocumentrefuses a point that is not{ x, y }, such as[x, y], aviewCenterthat is not a point, a size of 0 or less, and text under 1.8 mm.- A project with a bad sheet annotation does not open, and
applyrefuses it. TheProjectFileErrorpath names the annotation field, and the message gives the value. Its code is one of these:
Native sheet edits
In select mode, double-click text, a leader, or a dimension label to edit it in place. Enter emits oneedit-text event with targetId and a replacement annotation; Escape or leaving the input cancels. Delete and Backspace emit one delete event for the selected annotation or viewport. Typing in a field does not delete the selection.
The renderer never changes the document. Apply the candidate through ProjectManager.apply with replace-project-item on the sheet; a batch takes only building commands, so apply each changed marker after the sheet as its own replace-project-item. Then call renderer.update(manager.snapshot().paper). Keep dependent viewport annotations and marker targets valid when deleting a viewport. A refused candidate must redraw from the unchanged manager snapshot. The compose-a-sheet example demonstrates this path with Undo and Redo.
Move and resize preview on screen. Pointer cancellation or Escape removes the preview without emitting a committed candidate. Text editing supports plain labels; it does not edit rich text or table cells.
Resize grips are available for image annotations, rectangle shapes and circle shapes. Their resize event includes a detached replacement annotation in paper millimetres: images retain their source and authored aspect ratio, rectangles retain their authored corner order, and circles retain a circular aspect ratio. Apply this annotation through the same sheet command as a move or text edit, then redraw from the authoritative project snapshot. A refused candidate restores the original geometry and adds no history. Viewport resize continues to provide frame.
Text, leaders, dimensions, viewport-linked measures and line/polyline shapes have no resize grips. They remain selectable and retain their supported move, text-edit and Delete actions; resizing their bounding boxes would not define a valid native geometry edit. No model-space anchors or annotation font sizes are scaled by a resize gesture.
Customize title blocks natively
Title-block elements are protected in normal sheet mode. Callrenderer.setTitleblockEditing(true) for explicit customization; call it with false when finished. In this mode, native selection and grips move fields, logos, rectangles and divider lines. Fields, images and rectangles can be resized; logo grips preserve the original aspect ratio. Divider lines can be moved or removed. Page pan/zoom and typing-target protection remain available. Escape and pointer cancellation restore a gesture preview without publishing an edit.
editTitleblockElement(edit: TitleblockElementEdit) supports these validated commands:
edit-titleblock event with template (a detached normalized candidate) and elementId. A select event in this mode provides elementId instead of a viewport/annotation targetId. The renderer owns no template history and never changes the registry. A consumer stores the candidate under a new immutable resource ID before committing its reference through the existing sheet command:
Position drawing contents inside a viewport
Callrenderer.setViewportContentEditing(viewportId) to drag the resolved vector drawing within its existing paper frame. The frame, rotation, clipping and scale remain unchanged. The candidate viewCenter is in model metres and uses the native inverse viewport transform. Missing or unresolved vector contents throw before entering the mode; raster contents do not support model-space positioning. Pass undefined to return to ordinary sheet editing. Title-block customization and content positioning are exclusive modes.
renderer.update(manager.snapshot().paper) as in the composition recipe. Each completed drag publishes one candidate; the renderer never mutates the document or adds history. Escape, pointer cancellation, tool or mode changes, updates and disposal discard an active preview. The renderer redraws authoritative contents after a candidate callback, including refusal. Frame editing and annotation text/Delete actions stay protected in this mode; paper navigation remains available.
Native paper overflow reports
PaperExporter.preflight(sheetId, options) returns a detached Promise<PaperPreflightReport> without changing the document, fitting a view, shrinking text or changing export output. options.target is required ('pdf' or 'svg'); the optional style has the same precedence as an export call. Use the same document and render dependencies, including frozen resources/date, as the export.
ProjectFile, use preflightProjectSheet(project, sheetId, options) to reuse the native project export context: saved/legacy plans, prepared raster resolvers, resources, date and temporary-build disposal. Its required options combine ProjectExportOptions with PaperPreflightOptions; use the same frozen project and export options for preflight and output.
selectedProject.paper before both calls. This keeps automatic page counts/order consistent: single-sheet preflight uses the supplied document’s page context, while exportProjectPdf counts its selected output. The wrapper does not silently select, reorder or mutate your project.
All bounds are in paper millimetres. paperBounds is the physical page, independently of printable margins. items retain annotation IDs, viewport IDs with content/title parts, normalized titleblock element IDs and the frame source. Each item supplies its known conservative bounds when available and coverage: 'complete' | 'partial'. Report bounds unions the known item bounds; it does not include an unknown text extent. Empty layout can have no bounds.
Warnings have these codes:
outside-paper: conservative layout bounds cross the physical page. This can overestimate actual ink, especially joined strokes and font overhangs; it is guidance about possible cropping, not a pixel-exact ink test.title-overlap: a view title whose style setstextMmorpositionstands on the drawing of its own or another viewport, or on another view title, as a title can that widened or moved to stay on the paper. The sheet still draws;messagenames the viewport andboundsis the place of the title’s words, estimated at the width of Paper Mono.unknown-text-metrics: the text cannot be measured under the qualified font contract. PDF measurement currently covers printable ASCII in the embedded Paper Mono face, including native height, alignment, rotation and tracking. Other glyphs/families, including the PDF standard-font fallbacks, remain explicit partial coverage. SVG CSS font metrics are not qualified; nonempty SVG text produces this warning rather than borrowing PDF fallback metrics.missing-resource: the referenced titleblock registry/template is unavailable. Its source retains the template ID; measurement remains partial instead of declaring omitted branding safe.
partial if any item has a measurement gap. No outside-paper warning in a partial report is not a safety verdict. Complete coverage means conservative authored layout is measured, not that arbitrary fonts or exact glyph ink have been established. Image rectangles are conservative layout bounds; this method does not decode or validate image files, perform all export-resource checks, or replace issuance validation.
Viewport content bounds are intersected with the box of the native viewport clip (the frame, and each view-mark head that reaches past it); their titles remain outside that clip. North arrows, scale bars, tables, schedules and revision tables are measured from the geometry the export draws. Field rectangles determine placement/alignment rather than text width, so long titleblock values are measured as text. Native annotation/measure/frame/style geometry is reused. SVG-only short-outline suppression stays SVG-only. Existing boundsOfPrimitives retains its analytic-geometry/text-anchor fitting semantics.
Stroke bounds follow the native cap/join policy. Round joins use half the stroke width; joined miter outlines use a deliberately wider conservative envelope. Native SVG omits tiny outline stubs while native PDF retains them, so target reports can differ.
A missing sheet or unresolved native viewport keeps its existing error behavior. Apply any intended document correction through existing project commands; preflight owns no history or persistence.
Isolating copied paper styles
Setsheet.inheritDocumentStyle = false to resolve that sheet and its viewports from local style
inputs instead of the document’s style ID/overlay. Absent or true preserves existing inheritance;
non-boolean values are refused at the native sheet field path. With no local/caller style input,
the legacy unstyled policy remains unchanged.
Capture a copied source’s effective native resolveSheetPolicy(sourceSheet, sourceRenderDeps)?.style
as a detached styleOverride, omit its already-resolved styleId/extends, and use the flag on
the created native sheet. Omit style fields if source policy is undefined. An isolated partial
overlay uses the shipped ISO palette as its implicit base; unrelated destination registry entries
cannot replace that implicit default. Explicit local style references still use the native registry,
and explicit caller style overrides remain last. Carry resources required by explicit references.
The flag persists through native project JSON and existing sheet commands/undo. It changes paper
style inheritance only, not unit conventions, dimension-style registries or other destination sheets.
createEmptyDocument
A blank document with no sheets, at the current version.validateDocument
Structural guard for a deserialized document (validate at the storage boundary).findSavedView
Look up one saved drawing definition without resolving or drawing it.UnresolvedSavedViewError
A named view needs a project-level resolver before it can be drawn.Types
PaperDocument
The serializable paper-space document — the source of truth a consumer stores and syncs (.spec/debt.md “Paper / drawing layer”).From version 2 a viewport’s and a text annotation’s
rotationDeg turn counter-clockwise as the
sheet is seen. A version 1 document turned them clockwise; it is moved to version 2 when it is
drawn or opened in a project (migratePaperRotations), each turn negated so nothing moves.Which conventions the whole drawing set follows: millimetre dimensions and 1:50-style scales, or
feet-and-inches and 1/4” = 1’-0”. A set is one country’s practice, so this lives on the document
rather than per sheet. Absent means
"metric", so existing documents are unchanged.Named dimension styles, keyed by the id an annotation’s
styleId names. Absent means every
dimension uses DEFAULT_DIMENSION_STYLE.The paper style the whole set is drawn in — a builtin id or one of this document’s own
paperStyles.An overlay on the style: one class changed without forking the preset. Plain JSON, like everything
else here.
House styles that travel with the file, resolvable by id. They outrank the builtins and anything a
host registers.
Sheet
The issues of this sheet, oldest first. The title block’s
revision field shows the last code;
a revisionTable annotation lists them all. Absent means no revision.Absent/true inherits document style inputs. False uses local sheet/viewport inputs and explicit
caller overrides only.
Viewport
SavedDrawingView
Authored drawing intent.PaperStyleId
A builtin autocompletes; any other string is a custom (registered) id.PaperStyle
A style, or the overlay a document/sheet/viewport layers on one.Keyed by the physical role of a section or elevation line (
cut, silhouette, projected,
hidden, datum, marker, surface, ground, existing-ground): composed after the shipped
role pen and before classes. The shipped existing-ground pen is 0.25 mm and dashed.Ladder steps by depth for
silhouette and projected lines: the first band whose untilM is at
or beyond the line’s depth, in metres from the view plane, adds its ladderStep.The least paper gap, in mm, between two parallel lines of a material pattern on a seen face
(
DrawingStyle.surfacePattern) at the scale of the viewport. A course closer than this to the
last kept course beside it is left out, so a shallow roof seen from its eave keeps every n-th
course. Absent leaves every course.Composed on top of the class entry for an HLR edge class (
Hidden, VisibleCrease); the shipped
EDGE_CLASS_MODIFIER is already applied underneath, so these are deltas. visible: false drops
the edge class.Keyed by the
material a cut region carries (a wall material such as WOOD, or a model material
key): how that material is inked, weighted, filled or hatched. Composed after classes and
edgeClasses and before phases, so a phase that sets a fill or a hatch still wins.Plan cut outline weights in paper millimetres, keyed by saved wall type id. Each weight is finite
and positive.
Composed after
classes and edgeClasses on a primitive stamped with that phase.Whether a producer’s explicit
style.fill reaches the paper. "allow" is resolvePen’s
behaviour and the default; presets say "ignore". "ignore" also leaves out the colour of the
lines of a material pattern. A paper knock-out (fill.paper, the mask under a stair word) reaches
it either way.How a sheet’s text annotations (notes) sit on what they cover. Absent draws them as before,
straight over hatches and lines. See AnnotationTextStyle.
The view titles of the sheet. A view title takes the style of the sheet, not of its viewport.
PaperStyleRegistry
PageSpec
Paper units = millimetres, top-left origin (A4 = 210 × 297).
Uniform inset from every edge. Still the only inset when
frame is absent, which is what keeps
existing documents rendering exactly as before.The printed drawing frame — border, asymmetric filing margin, centring marks and zone grid (ISO
5457). Absent means no printed frame, and
margin alone positions the title block.Annotation
Sheet annotations, in paper units (mm, top-left origin).TitleblockInstance
Placement of a title-block template on a sheet, with values bound to the template’s named fields (.spec/debt.md “Paper / drawing layer”).SheetRevision
One issue of a sheet: anid unique on the sheet and a code, both nonblank, a date and a description.
ViewportBase
A live reference into model space, placed on a sheet. The package does not export this type by name.Placement rect on the sheet, in paper units (mm, top-left origin).
The drawing turned about the centre of
frame by this many degrees, counter-clockwise as the
sheet is seen, as CAD turns a view (clockwise before PaperDocument version 2).What the centre and the fit of a viewport without
viewCenter are taken from. 'drawing' (the
default, and what absent means) is the bounds of the whole drawing. 'building' leaves out the
site parts: the plot outline, the owned land, the setback and no-build lines, the ground line, the
site labels, the context buildings and the boundary distances of a block plan. Everything else
counts, every other label included, so a building off the centre of a long plot is centred in the
frame. The centre is read from the drawing at each render, so it follows model edits. A drawing of
site parts only is centred as a whole. An explicit viewCenter wins over it.Text height in paper mm for the plan text of this viewport, 1.8 or more: room names and labels
print at it, room detail lines at 0.7 of it but not under 1.8. Wins over the
labelMm of the
saved view. Markers and level labels keep their own size. Absent leaves the view’s sizes.A rectangle on
frame: weightMm (more than 0, default 0.35) and ink (#rrggbb, default
black). Absent draws none.This viewport’s style, outranking the sheet’s and the document’s — how a 1:20 detail hatches
differently from the 1:100 plan beside it.
ViewSource
What the viewport draws — resolved by the core drawing extractor (§7).SavedRasterIsometricView
Saved rendering intent, independent of generated pixels and sheet placement.SavedPlanView
A saved plan view: a horizontal cut of one storey, or a site plan when it names no storey. The package does not export this type by name.SavedRoofPlanView
A saved roof plan of one building: every roof of its storeys, whole, seen from above, with the outer faces of the walls of every storey of the building as one dashed line under them. The package does not export this type by name.The saved ids of what this view alone does not draw: elements, blocks, context buildings or whole
buildings. A hidden element hides nothing behind it, and its tags and dimensions are not drawn. A
hidden opening keeps its hole; a hidden wall or roof takes its openings, rooflights and dormers
with it. An id that names nothing is ignored.
'omit' leaves out every rooflight and its tag, as a view hides one category: a small-scale site
drawing shows plain roofs. Default 'draw'.Element IDs admitted to the existing or complete state on this view alone. Hidden IDs still win.
A text repeated along each edge of the site boundary, outside it, as on a storey plan, laid out at
the scale of the first sheet viewport that shows the view (1:100 on no sheet). Drawn only with
showSiteBoundary. No text when absent.auto tags each rooflight the roof plan draws with the text openingTagText gives it, with no
frame, as on a storey plan. Off when absent.How ridges, hips and valleys draw:
line (the default) one line, band two lines bandMm
(default 1) paper mm apart, centred on it, at the scale of the first sheet viewport that shows the
view (1:100 on no sheet).How the roofs fill:
material (the default) with the surface pattern of each roof’s material,
none with no pattern. The material, its elevations and its sections do not change.The slope arrow and the pitch text of each slope:
omit leaves both out of this view. Default
draw.The walls under the roofs, dashed:
omit leaves them out of this view. They still hide the part
of a slab that is inside them. Default draw.Fills each slope of the roofs by the way it falls, as light from one side.
lightDeg is where the
light comes from, in degrees clockwise from project north (-Z) seen from above: 90 lights the
slopes that fall to the east. tones are the fills, #rrggbb, two or more, the first on the
slopes towards the light and the last on those away from it (default a light and a dark grey,
['#999999', '#4c4c4c']). A flat roof has no slope and takes none; a dormer and a bay roof take
the tone of the slope under them. No fill when absent.The placed blocks of the building:
draw draws the plan symbol of each, such as a tree, where it
stands clear of the building and no higher roof or slab hides it, with its phase by the
phaseFilter. Default omit.How a section head bubble holds its numbers, as on a storey plan:
fixed (the default, 10 mm) or
fit-text.SavedBlockPlanView
A saved block plan of one building: its roof plan on its site, with map layers, the distances to the boundary and the context buildings. The package does not export this type by name.What this view alone does not draw, as on a roof plan. The boundary distances stay those of the
real buildings; with the building of the view hidden there are none.
Dimensions from the building to the nearest boundary edge on each side. Default
auto.'omit' leaves out the site’s context buildings and keeps its roads, as a view hides one
category: when a map layer already draws the buildings round the site, a neighbour modelled by
hand would draw twice. The boundary distances then measure to the plan’s own buildings only.
Default 'draw'.The names of the context buildings.
level names print level on the sheet however its viewport
turns the plan; otherwise a name turns with the plan. heightMm is their height on the paper, 1.8
or more, in place of labelMm.The roads and the waters of the site.
names: 'omit' leaves out their names. withinM draws only
what is inside the site boundary or no more than that many metres from it, 0 or more; it does
nothing on a site with no boundary; it cuts the contours too. Absent: every line and name.Light fills under the linework: the waters, the roads, the context buildings and, in the colour of
the paper, the footprints of the model’s buildings, as far as the view draws their lines. Default
false. Their colours are the pens
WATER_FILL, ROAD_FILL and CONTEXT_FILL.Lines drawn by hand on this view alone, such as the edges of a drive, over everything else. They
do not move or resize the plan on its sheet.
Element IDs admitted to the existing or complete state on this view alone. Hidden IDs still win.
How ridges, hips and valleys draw, as on a roof plan, but at 1:200 on no sheet.
The surface pattern of the roofs, as on a roof plan. Default
material.A fill on each roof slope by the way it falls, as on a roof plan. No fill when absent.
The dashed walls under the roofs of every building, as on a roof plan. Default
draw. The
building outlines that the plan draws at 1:1000 and smaller stay.At the 1:1000 scale of its sheet viewport and smaller, the plan draws each building as the outline
of its walls in a heavy pen, with no roof lines and no texts, as a location plan does;
true adds
a light hatch inside the outline. Default false. Larger scales draw the roof plan.SavedViewBase
The package does not export this type by name.PhysicalDrawingScope
Omitted scope means the entire model; an explicit list never silently drops unsupported IDs.The buildings the view draws, by id, nonblank, each once and each in the model: every other
building is left out, with its elements, level heads and grids. Absent with no
buildingId: every
building. Not with buildingId; an empty list is refused.The saved ids of what this view alone does not draw: elements, notes, grids, blocks, context
buildings or whole buildings. A hidden element hides nothing behind it, and its tags and
dimensions are not drawn. A hidden opening keeps its hole; a hidden wall or roof takes its
openings, rooflights and dormers with it. An id that names nothing is ignored.
Show the massing: each part of the mass of every building, cut in a section and seen in an
elevation. Off when absent. The ground line of the site draws either way.
existing draws the model before the work, proposed after it with the demolished work, and
complete the finished building without the demolished work. Absent: no phase graphics.Element IDs admitted to the existing or complete state on this view alone. Hidden IDs still win.
Context buildings of the site. Default true in an elevation or a section; false leaves them out.
WorldXZ
World XZ coordinates in metres, written as [x, z]. The package does not export this type by name.SavedLevelHead
A level head of a section or elevation; a reference that names nothing draws nothing and warns.SavedHeightDimension
A vertical dimension between two heights of the model, atat metres across the view frame.
SavedPartialCrop
Draw only insideoutline, in the crop frame of the view: metres, x right, y up.
How a break edge draws:
zigzag (default) puts a zigzag at its middle, plain draws it as one
straight line.ProjectionCamera
Projection camera for the extractor.ClassStyle
One element class’s treatment.An explicit lineweight in paper mm. Prefer ladderStep, which keeps the weight a rung on
PEN_LADDER_MM.Rungs to walk on
PEN_LADDER_MM. Steps SUM across the style, the class, its byKind entry and
the edge class.Poché fill for regions;
"none" removes it. "material" gives each cut the poché it has with no
statement of the style: the hatch or the solid fill of its material.Poché hatch: a key into
HATCH_PATTERNS, a literal spec, or "none". "material" draws the
hatch of the cut’s own material, and leaves a cut whose material has none at the stated fill.Per primitive kind, merged over the class entry — how a door’s swing (an arc) is drawn lighter
than its leaf (a line) without a second class.
Per named part of a symbol, keyed by the primitive’s
style.subId and composed after byKind and
before the edge class. visible: false drops the part. The outline of the joined walls of a plan
is the outline part of WALL, and the lines between wall layers its layer-boundary part,
which keeps 0.25 mm unless the part states a weightMm. The plan cut of a curtain wall’s members
is the mullion part of WALL, of which only visible is read.Per HLR edge class (
VisibleCrease, Hidden, …) on this class only, composed after the
style-wide edgeClasses entry. visible: false drops that edge class on this class; visible: true draws it where the style-wide entry drops it.DepthBand
One band of PaperStyle.depthBands. The package does not export this type by name.PhaseStyle
One phase’s treatment: a delta on every primitive of that phase, then one per element class.Keyed by
ElementType, composed after the phase entry on a primitive of that phase and class,
with its byKind and parts. visible: false drops the class in that phase.AnnotationTextStyle
The ground behind a sheet’s text annotations (kind: 'text').
HandProfile
The character of hand-drawn linework.The weight the amplitude is quoted at; a stroke’s interior samples scale by √(weight /
weightRefMm), so heavier nibs wander more.
Cell size of the field. Two faces of a wall a few mm apart sample nearly the same value, so the
wall keeps its thickness; a long stroke crosses several cells and reads as a shallow S.
Strokes shorter than this are not subdivided (their ends still follow the field, so they stay
attached).
A second, finer octave of the field laid over the bow — the nervous wander of a fineliner on a
napkin. Positional like the bow, so shared vertices still agree. Absent means the bow alone;
segmentLenMm must be a fraction of latticeMm for the wander to be sampled.Share of corners drawn crossed; the rest stop short by an open gap. One decision per corner,
shared by every stroke that meets there.
Strikes by weight band, e.g.
[{ atOrAboveMm: 0.35, strikes: 2 }].Each re-strike wanders on its own by this much (mm) instead of tracking the first pass exactly —
the passes cross and the line goes hairy.
A short stroke at the start at
startBeadWidthFactor × weight (a bead when > 1, a ramp when
< 1). 0 draws none. Only on strokes long enough to carry one.Pull the fill in from the outline by this much: the sliver of paper an inked poché leaves against
its line. 0 fills to the line.
Draw the hatch as continuous back-and-forth zigzags across each region — a scribbled poché, ONE
stroke per run, laid across the region’s long axis the way a hand scribbles a wall band — instead
of separate parallel lines.
Per-vertex jitter of a scribble’s pitch and tilt, as a fraction of the spacing — what keeps a
scribble from reading as ruled hatching.
± fraction of the spacing, one value per region (so lines stay in register within a region).
When the predicted output would exceed this,
shedClasses are dropped BEFORE synthesis — a
decision about what is on the sheet, never about where a primitive sits in the array.How far the hand reaches beyond the building. By default only viewport geometry is redrawn:
dimensions, the frame and the title block stay ruled, because a drawing that wobbles its
dimensions is a presentation, not an issue. A napkin sketch is exactly that presentation, and asks
for all three.
SheetFrameOptions
What a document may say about its frame.TextAnnotation
Degrees about
position, counter-clockwise as the sheet is seen (from paper version 2; clockwise
before). Absent is level.DimensionAnnotation
The package does not export this type by name.LeaderAnnotation
The package does not export this type by name.The mark at the target: an open arrow, a filled dot, or nothing. Default
arrow.How the words stand at the last point: they start just past it (
left), end just before it
(right), or have it at the middle of their foot (center). Default center.ImageAnnotation
The package does not export this type by name.ShapeAnnotation
The package does not export this type by name.NorthArrowAnnotation
A north arrow, tied to a viewport: it pointstrueNorthDeg of the site (a bearing, clockwise) less the viewport’s rotationDeg (counter-clockwise), clockwise from up the sheet.
The drawn form:
needle (the default) an open diamond with an N, arrow a solid arrowhead on a
shaft with an N, compass a four-point star with N, E, S and W, spire a tall split point that
stands on its N, which a radiusMm of 30 or more suits.ScaleBarAnnotation
A scale bar, tied to a viewport: its length follows the viewport’s scale, and its labels the document’s unit system.Model metres in one division, more than 0. Default: the smallest 1, 2 or 5 × 10^n m (ft in
imperial), 1 unit or more, that is at least 8 mm on paper at the viewport’s scale. 1 m at 1:100, 2
m at 1:200, 5 m at 1:500, 10 m at 1:1250.
The drawn form:
alternating (the default) filled and open cells, ticked one line with a tick
at each division.TableAnnotation
A table of fixed text: a header row fromcolumns, then rows, each with one cell per column.
ScheduleAnnotation
A schedule: a table of the doors, windows or rooms of one building, or of one storey of it, read from the model at export, so it follows each model change.SheetScheduleAnnotation
A drawing list: one row per sheet of the document, in sheet order, read from the document at export, so it follows each sheet added, renamed or revised.RevisionTableAnnotation
The revision table of its sheet: a header row, then one row perSheet.revisions entry in order, with the code, date and description.
LegendAnnotation
A key of the drawing: one row per entry, a swatch then its label, under an optional title.PlanTagPlace
The saved place of one plan tag. The package does not export this type by name.RoomLabelPlace
The saved place of one room label:at is the point of the label’s name line in plan metres, x along world X and y along world Z, the same at every sheet scale.
The package does not export this type by name.
The label turned about
at by this many degrees, counter-clockwise as the plan prints, so 90
reads up the page (clockwise before project version 4). Absent: level. The label fits its room
along its turned lines, and a leader leaves from its turned box.PlanLabelClearance
How the labels of a plan keep clear of its section and elevation marker lines (the cut line, its heads and the elevation arrows). The package does not export this type by name.PlanCurtainWalls
The view settings of the curtain walls of a plan. The package does not export this type by name.omit draws no cut mullion, and the glass line runs on through the place of each, to the end of
the wall and to each door. Default draw.The sill boards, keyed by the saved id of the wall: how far, in metres (finite, more than 0), a
board stands off the face on the
left and on the right of the wall, walking from its first
point to its last (the left of a wall drawn along +x is towards -z). Each is an outline over the
whole grid. Drawn only: it adds nothing in 3D. An id that names no straight curtain wall the plan
draws is ignored.PlanRoomLabel
The lines of the room labels of a plan. The package does not export this type by name.template writes the ceiling height line; {mm} is the height in mm. Default CH {mm}.{
show?: boolean;
template?: string;
decimals?: number;
trimZeros?: boolean;
hideForUsages?: string[];
outranksCeilingHeight?: boolean;
}
The area line.
show: false prints no area. template writes it; {area} is the
number. Default {area} m². decimals sets the decimal places of the number. DefaulttrimZeros: truedrops trailing zeros, so13.0prints13. Default false.hideForUsageslists the roomusagevalues that print no area, in any case.outranksCeilingHeight: true, in the plan label pass only (not the sheet re-place pass): a label with no clear place inside with all its lines then tries an inside place without the ceiling height line, keeping the area, before a place outside on a short leader with all its lines. Default false: it tries the outside places next and drops both lines only after them.
nameBeforeLeader: true, in the plan label pass only (not the sheet re-place pass): a label with
no clear place inside with its detail lines prints its name alone inside, at its size and then at
the smallest size, before a place outside on a short leader with all its lines. Default false: it
tries the short leader first.The smallest height every line of a room label (its name, number and area) prints at, in paper mm:
finite and 1.8 or more. In each viewport that prints the plan, a label with a line under it grows
as a whole, its lines and the gaps between them, until its smallest line prints at this height, so
the area line is as readable at 1:200 as at 1:50. Absent: 1.8 mm, the smallest height of ISO 3098.
The fit is unchanged: a label in a narrow or crowded room shrinks to fit, at the scale the plan
lays out its room labels at (that of the first sheet viewport that shows the view, else 1:100),
but its name not under this; when it does not fit, it overflows its room (or takes a leader, as
before). A label sized by
labelMm prints at that size, so this has no effect on it.PlanOpeningSymbols
The view settings of the door and window symbols of a plan. The package does not export this type by name.closed draws the panels of a FOLDING door in line across the opening. Default open.reveal draws the frame and the glass of a window without a bay in a band at the wall face of its
sill, and leaves the rest of the reveal open. Default wall-depth.nosed draws the sill of a window without a bay with a curved front; none draws no sill.
Default rectangle.line draws a bay’s glass as one line at the middle of its frame band; none draws no glass.
Default pane.PlanTagShape
The frame of a plan tag: a circle, a hexagon, or no frame round the text. The package does not export this type by name.SavedContours
The contours of a site plan or a block plan: a line of the site’ssurroundingGround every interval metres above the sea, under everything else.
The level of each index line along it; of every line when none is an index line. Default false.
SavedMapLayer
A map of the project file under a site plan or block plan, placed through the site’sprojectedAnchor.
Fill, ink and weight by a property of the features. Absent: every feature as the
MAP class.Names the features by a property, once for each value. Absent: the layer draws no text.
SiteBoundaryLabel
A text repeated along the site boundary: once in the middle of each edge, or one for everyspacingM metres of the edge when set.
The package does not export this type by name.
SavedDetailLine
An open line of one view. The package does not export this type by name.PhysicalDrawingSettings
Shared appearance for technical vectors and raster presentation of one saved view.Absent means hidden lines are omitted from technical vectors.
Authored storey elevations, relative to this world-height datum in metres.
decimals (0-3,
default 3) rounds the value; suffix is printed after the unit (+5.4 m OD).The colours of the materials on seen faces (
surfaceBackground, surfacePatternColor). Default
draw; omit leaves them out and keeps the pattern lines in their pen.{
extent: 'crop' | 'site-boundary';
stopAt?: 'cut-building' | 'outer-walls';
outsideRunM?: number;
fillBelow?: boolean;
}
How far the ground line runs. Default
crop; site-boundary ends it where the view plane crosses
the site boundary, and keeps the crop with a drawing warning where it crosses none. Sections only:
stopAt is where the ground stops at the cut building, cut-building (the default) at the outer
end of any cut part standing on the ground, outer-walls at the outer faces of the cut walls
standing on the ground, running under steps and slabs outside them; outsideRunM limits each run
outside the building to that many metres from the stop, and always reaches the outer end of the
cut parts standing on the ground. No limit when absent. fillBelow: true (sections only) fills
the ground under each run of the ground line down to the bottom of the crop, as a SITE region of
role ground with the producer fill earth (a paper style with producerFill: 'ignore' takes it
from roles.ground). Off when absent.Sections only.
true draws each room the section plane crosses as a closed thin line, its outline
cut by the plane from its floor to its height. Off when absent.Sections only.
omit leaves out the cut and seen material under the ground line of the site; the
ground line stays. Default draw.How doors and windows draw in elevation and section.
frameLines: 'outer' draws the frame,
mullions and transoms of a window as one band (default both-faces); sashOutlines: false leaves
out the inner outline of each sash (default true); sill draws a sill as its box, its top line
only, or not at all (default box).Automatic heads of each storey and saved level. Default
draw. Authored levelHeads and grids
always draw.Level heads, automatic and authored, whose text would meet on the paper. Default
stack: on each
side the lowest head stays on its level and each head above it moves up, 1 mm clear of the text of
the head below, at the scale of the view’s first sheet viewport (1:100 when on no sheet). A moved
head keeps its true value and its level line stays on its true level, turning up to the head 2.5
mm off the model. off draws every head on its level, as before.Doors, windows and voids that do not fit their wall: the wall has no hole for them and the build
warns
opening-does-not-fit. Default draw at their saved place; omit leaves them out.Where the site boundary line starts.
top is the top of the crop (the default), eaves the
highest eaves of the building in the view, or a world height in metres. behindBuilding: true
hides the line where the building is in front of it. Absent: from the top of the crop, drawn over
the building.SavedHeightRef
A height of the model that a level head or a height dimension follows.HandReach
The sheet furniture a hand profile may redraw, besides the building.Dimension, leader and view-title lines, and un-coloured shape annotations. Labels keep their
measured value; authored colours (a redline) stay ruled.
ShapeKind
The package does not export this type by name.TableColumn
One column of a table: its header and its width in paper mm.ScheduleOf
What a schedule lists.ScheduleColumn
One column of a schedule: the field, and optionally its header and width in paper mm.LegendEntry
One row of a legend: its swatch and the text beside it.MapLayerStyle
The look of the features of a map layer by the value of one feature property.The look of the features whose property has that value, as text.
MapLayerLabels
The texts of a map layer: each value ofproperty among its features, written once — along the middle of the longest line that carries it, turned along that run and readable from the bottom or the right; else at its point; else level at the area centre of its largest polygon.
SavedMeanGroundRef
The mean ground height around a building: along the outer faces of the walls of its lowest storey, on the finished ground (ground: 'finished', the default: the site’s groundPoints, else flat at its elevation) or the existing one.