Skip to main content
A sheet is a page. A viewport puts one saved view on the page at a scale. You can put many viewports on one sheet, and one view on many sheets. A sheet also holds dimensions, notes and a title block.

Before you start

You have a project with the views ground-plan, section-a and elevation-south, and the section mark, from Create a plan view and Cut a section.

Write the sheet

All sizes and positions on a sheet are in millimetres. The origin is the top-left corner of the page. This sheet starts with one viewport, the plan at 1:50.
A title wider than its viewport frame wraps onto more lines, each no wider than the frame. The rule goes under the last line. The viewTitle field of the sheet’s paper style changes every title of the sheet: rule: false removes the rule, position: 'above-right' puts the title above the frame at the right ('below-center' centres it under the frame), textMm: 3 sets it 3 mm high, scaleTemplate: 'Scale {scale}' prints Scale 1:100, and fontWeight: 'bold' sets the title bold. A viewport’s own styleOverride.viewTitle outranks the sheet’s, so a plan and an elevation on one sheet can have titles of two sizes.

Add it to the project

A project is data, so each change makes a new project. This helper changes the sheet and keeps the other parts of the project:

Put more views on the sheet

Add one viewport for each view. These viewports put the section at 1:50 and the elevation at 1:100.

Change the scale

The scale is a field of the viewport. The title below the viewport shows the new scale.

Number the section mark

The section mark on the plan can show where its section is. Give the target of the mark the sheet and the viewport. The mark then reads 2 / A-101: drawing 2 on sheet A-101.

Add a dimension and a note

A sheet holds annotations. To show a dimension on every plan of a storey, save it on the storey instead: see Dimensions on a storey. A measure dimension uses two points of the model, in metres, in the view of one viewport. Floorkit calculates the distance, so the text is always the real size. A text note uses one point on the page, in millimetres.

Add a north arrow and a scale bar

A northArrow and a scaleBar belong to one viewport. A viewport’s rotationDeg turns its drawing counter-clockwise on the sheet, as CAD turns a view. The north arrow points to true north: the site’s trueNorthDeg, a bearing clockwise from up the page, less the viewport’s rotationDeg. The scale bar uses the viewport’s scale, so it changes length when you change the scale. It has 4 cells. A cell is the smallest 1, 2 or 5 × 10^n m (ft in imperial) that is at least 8 mm on paper, so a 1:100 bar has 1 m cells and a 1:500 bar has 5 m cells. Set unitMeters and divisions to choose them yourself. Positions are in millimetres on the page. Add them with addAnnotation. The north arrow symbol is needle (the default), arrow (a solid head on a shaft), compass (a star with N, E, S and W) or spire (a tall point on its N). The scale bar style is alternating (the default, filled and open cells) or ticked (one line with a tick at each division). A scale bar caption, such as Metres, prints under the bar.

Add a schedule

A sheet can also hold a table, or a schedule of the doors, windows or rooms that follows the model. See Tables and schedules.

Show the sheet on screen

createSheetRenderer makes the screen view of a sheet. It needs your sheets and a function that draws a saved view. Here project is a function, so the renderer always draws your current project. With { session }, each view reads the model and the live build of the session, so the renderer does not build the model again.
resolveSavedView draws a viewport that has a viewId. resolveSavedViewKind names the kind of that view, so the north arrow tool places only on a plan, roof plan or block plan; without it a north arrow is accepted on any viewport that has a viewId. extractor draws a viewport that has its own source. This project has no such viewport, so the extractor gives the plan. resolveSchedule gives the rows of each schedule from the current model, as the export does; without it a schedule draws nothing on screen. After you change the project, call renderer.update(project.paper).

Let the user arrange the page

The user can select a viewport or an annotation and move it. The renderer does not change your project. It sends an event, and you save the change.
The create event comes from a drawing tool. renderer.setTool('text') starts the text tool: the user clicks the page and gets a note. Other tools are 'dimension', 'leader', 'line', 'rect', 'scaleBar' and 'northArrow'. A click with 'scaleBar' or 'northArrow' places that mark at the click, tied to the viewport under it, or to the nearest viewport when the click is on free paper. A north arrow goes only on a plan viewport. When nothing is placed, the renderer sends a refuse event whose reason says why and whose code is 'no-vector-viewport' (the sheet has no viewport with a vector drawing) or 'no-plan-viewport' (the viewport is not a plan). To disable a tool before the click, call renderer.markPlacement('northArrow'): it gives { ok: true }, or { ok: false, code, message } with the same code and sentence. Ask again on each redraw event: the renderer sends it each time it draws the sheet, after mount, update or setSheet, and by itself when a valid license comes back. renderer.setTool('select') goes back to selection. renderer.setViewportContentEditing(viewportId) lets the user drag the drawing inside one viewport instead of the viewport. The frame stays where it is, and the drag sends edit-viewport-content with the new viewCenter, in model metres. renderer.setViewportContentEditing() goes back to the sheet.

Move or hide a tag

A plan view with openingTags or wallTags shows tags on the sheet. The user can select a tag and drag it, or press Delete to hide it. The event has a tag, and tagEditCommand makes the command that saves it on the view, in tagPlaces. One move or one Delete is one undo step.
A moved tag keeps its offset from its automatic place in paper mm, so it stays at the same place on the paper at every scale. The other tags keep clear of it.

Change the paper style

A paper style changes the pens, the fills and the lettering of the sheet. It does not change your project.
undefined goes back to the style of the document. To export with a style, pass { style: 'ink-sketch' } as the options of exportProjectPdf.

Rules

  • The size of the page must agree with its format and orientation. pageSize gives you the correct values.
  • A viewport shows the full view, centred in its frame. Set viewCenter to keep one model point in the centre. Set centerOn: 'building' to centre the drawing without its site parts (plot outline, owned land, setback lines, ground line, site labels, context buildings, boundary distances of a block plan): a house off the centre of a long plot then fits the frame, and the centre follows model edits. viewCenter wins over it.
  • To show the same view at a different scale, add a second viewport with the same viewId.
  • The points of a measure dimension do not follow the model. If you move the wall, set the points again.
  • The renderer shows your sheets. It does not own them. Save each change in your project, then call update.

Next

Export a PDF

Get this sheet as a file.

Sheet types

See each field of a sheet, a viewport and an annotation.

createSheetRenderer API

See each member of the screen view.

Paper styles API

Make your own style.
Last modified on November 30, 2026