load_plan
Load a plan PDF from disk to start a new takeoff session or merge it into the existing working set, preserving all current data.
Instructions
Open a plan PDF from disk. Default: replace the whole session (previous documents, scales, conditions, and shapes are cleared). merge: true ADDS the document to the working set instead (#152) — a bid set is plans + schedule + addenda, not one PDF — keeping every scale, condition, and shape; sheet keys carry file names so documents never collide, the sheet graph spans the whole set (resolve_tag can chain a plan tag on one file to a schedule row in another), and the marked set covers every worked sheet. Re-loading an already-merged file is refused — reload = replace, deliberately. Returns file, files, page_count, and one entry per sheet. The loaded sheets also become browsable resources (takeoff://sheets). Coordinates are image px at render scale 2.0: PDF pt × 2, origin top-left, y down (the browser canvas's native space). Sheet payloads carry dims in both px and pt.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| path | Yes | Path to a plan PDF on disk | |
| merge | No | true = ADD this document to the working set, keeping all existing work (merge into an empty session is just a load) |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| file | Yes | The document just loaded (basename) | |
| note | Yes | ||
| files | Yes | Every document in the working set, load order (#152 — one entry unless merge was used) | |
| sheets | Yes | EVERY sheet in the working set, not just the file loaded by this call | |
| page_count | Yes | Total sheets across the working set |