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()intobuildingModelbefore you save. openProjectchecks the text. A problem throwsProjectFileErrorwith acodeand apath.- 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.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.Named drawing definitions; each can later be placed on one or more sheets.
Plan markers refer to saved views; source geometry remains derived. Schema 3.
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.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.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 gridcrs names (EPSG:<code>).