Before you start
You have a project. See Create a plan view.Open the project
AProjectManager holds one open project. It builds the building, and it keeps the views and the sheets. Add manager.root to your scene one time.
Save
save() returns the project as text, with the current building.
Reopen
ProjectManager.open reads the text, checks it and builds the building. Open the new manager first. Then remove the old one.
dispose() removes the plan editors of the manager and its session.
Handle a bad file
ProjectManager.open throws ProjectFileError for a bad file. The error has a code and a path.
ProjectManager.open throws BmBuildError or Error.
What the file holds
Floorkit makes the things in the right column again when you open the file.
Rules
- Do not use
JSON.parseand a type cast in place ofProjectManager.open. Only Floorkit checks the file. - Files from earlier Floorkit versions open. Floorkit writes them in the current format when you save.
- Keep the old manager until the new one is ready. If the new project does not open, the user still has the old one.
- You do not copy the building into the project before you save.
save()reads the current building.
Without the manager
If your app makes theBuildingSession itself, use saveProject and openProject. See the project file API.
Next
Export a PDF
Give the sheets to other people.
ProjectManager API
See each member of the manager and the project commands.