import_takeoff
Import a previously saved takeoff file to resume or extend work, merging conditions with existing data using safe, idempotent rules.
Instructions
The way BACK IN (#151): load an "opentakeoff.takeoff_canvas.v1" file — a prior export_takeoff, or the app's own save — into this session, through the SAME tested merge rules as the app's Sheet-menu import: finish-tag identity joins imported conditions onto this session's own (their knobs win), new ids append, duplicate ids skip (re-import is idempotent), and THIS session's calibration wins per sheet. An empty session adopts the file wholesale. Resume yesterday's work, extend a takeoff a human already reviewed (their ink stays ink — reviewed shapes arrive untouchable by agent verbs), or audit someone else's export with list_shapes/takeoff_summary. Requires a loaded plan; shapes referencing OTHER files ride along and count in totals but can't be viewed against this document — the reply's unknown_files names them. Approval marks ride the file too — transport, not minting: an estimator seal arriving by import stays estimator ink, listable but untouchable here. undo_last removes the imported SHAPES as one step; adopted conditions, scales, annotations, and approval marks stay.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to a takeoff_canvas.v1 JSON file on disk |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | Basename of the imported file | |
| note | Yes | ||
| replaced | Yes | true = the session was empty and adopted the file wholesale | |
| shapes_added | Yes | ||
| shapes_total | Yes | ||
| unknown_files | Yes | Files referenced by imported shapes that this document doesn't have — they count in totals but can't be viewed here | |
| scales_adopted | Yes | Sheets whose calibration came from the file (this session's own always wins) | |
| shapes_pending | Yes | Of the added shapes, how many are unreviewed machine pencil | |
| conditions_added | Yes | ||
| conditions_merged | Yes | Imported conditions that joined an existing finish tag (its knobs won) |