Skip to main content
A project file is JSON text. It holds the building, the saved views and the sheets. saveProject writes the text and openProject reads it.

Import

Example

Notes

  • These functions do not use the disk or the network. Your app stores the text.
  • Put session.snapshot() into buildingModel before you save.
  • openProject checks the text. A problem throws ProjectFileError with a code and a path.
  • The file does not hold geometry, images or undo history. Floorkit builds them again after you open the file.
  • Files from earlier versions open.

saveProject

Validate and serialize one project, upgrading older BuildingModels without changing the input.

openProject

Parse and validate project JSON without reading from disk or compiling the building.

ProjectFileError

A storage-boundary error with a stable code and a path into the project JSON.

Types

ProjectFile

The durable project envelope.
'floorkit.project'
required
1 | 2 | 3 | 4
required
From version 4 a room label place’s and a reference marker’s rotationDeg turn counter-clockwise. An earlier file is moved to version 4 when it is opened (migrateProjectRotations), each turn negated so nothing moves.
BuildingModel
required
SavedDrawingView[]
required
Named drawing definitions; each can later be placed on one or more sheets.
PaperDocument
required
readonly ProjectViewMarker[]
Plan markers refer to saved views; source geometry remains derived. Schema 3.
ProjectDisplay
Display settings saved with the project. Absent: every setting is off.
Record<string, string>
The .op text of each external asset of the building, keyed by its uri, so the project opens with no other input. A source that the caller passes wins.
ProjectMapSource[]
The maps that site plans and block plans draw under the model, named by mapLayers.

ProjectViewMarker

A marker’s parent is a saved plan or roof plan, not a block plan.

ProjectDisplay

Display settings saved with a project.
boolean
Show the buildable envelope of the site in the 3D scene (ProjectManager.setBuildableEnvelope).

ProjectMapSource

A map file kept in the project: GeoJSON or an image with a world file, in the projected metre grid crs names (EPSG:&lt;code&gt;).

ViewMarkerBase

The package does not export this type by name.

ViewMarkerTarget

A durable saved-view reference.
Last modified on November 28, 2026