Skip to main content
A session keeps each edit in a history. Undo and redo are one call each. Floorkit builds the geometry of that step again, so the 3D model and the drawings always agree with the model.

Before you start

You have a session and you applied one edit or more.

Add the two actions

Keep your buttons up to date

subscribe calls your function after each edit, undo or redo. It returns a function that stops the calls.

Rules

  • A new edit clears the redo list.
  • undo and redo return the new revision number, or null when there is nothing to do.
  • The history is not saved in the project file. A session that you open from a file starts with an empty history.
  • After an undo, get elements again from session.currentBuild by their ids. A changed element can be a new object, and Floorkit then disposes the old object. A changed wall, and a door, a window or a hole on a wall, can also stay the same object with new geometry.

Next

Save and reopen

Keep the building between visits.

BuildingSession API

See each member of a session.
Last modified on October 11, 2026