import_takeoff
Load a saved takeoff canvas file into the current session, merging conditions by finish-tag identity while this session's calibration wins, so you can resume or audit prior work.
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 uncalibrated empty session adopts the file wholesale. New dimensional shapes refuse atomically if their source scale differs from the session calibration or is missing; align scales and re-export, or use a fresh session. Counts and duplicate IDs are exempt. Legacy agent traces without review flags arrive reviewed:false. 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 | |
| rules_imported | Yes | Correction rules (#88) that arrived with the file — apply_rules re-runs them | |
| 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) |