design_plan_from_sheet
Reconstruct a validated design plan from an existing schematic sheet so hand-drawn or legacy projects without a canvas file can be edited plan-first instead of symbol by symbol.
Instructions
Read a DesignPlan back off a schematic, including one you did not draw.
Use this when you are asked to change a schematic that has no
<project>.canvas.json beside it: a sheet drawn by hand, or
one from an older project. It gives you the plan the rest of the
design tools take, so an edit becomes "change the plan, lay it
out again" instead of dragging symbols around one at a time.
The plan is reconstructed from what is actually drawn: the components give the parts, the compiled netlist gives the nets, and the power-port glyphs say which nets are rails. It is validated before it is returned.
WHAT A SCHEMATIC DOES NOT RECORD, so you must supply it:
roleon each part. This is the tag that lets the placer recognise a decoupling bank, a crystal cluster, an op-amp motif. A plan without roles lays out noticeably worse. Read the returned part list and netlist and assert the roles yourself before laying it out.zoneon each part, if you want functional blocks.Single-pin nets, which the plan schema cannot express. They come back in
dropped_pins.
Then: edit the plan, call design_layout_schematic to see it,
and design_execute_plan to apply it. Pass
design_hints_from_sheet output as placement_hints if you
want the existing positions kept.
Args: project_path: The .PrjPcb the sheet belongs to. Its compiled netlist is what supplies the nets. sheet_document: Full path to the .SchDoc to read. Defaults to the active document.
Returns:
ok / plan (a DesignPlan dict, or None on a refusal) /
parts_read / nets_read / dropped_pins / notes.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| project_path | Yes | ||
| sheet_document | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||