duplicate_sheet
Duplicate a hierarchical sheet, copying the child file with new UUIDs.
Instructions
Duplicate a hierarchical sheet, copying the child file with new UUIDs.
The new block is a copy of the source block, moved to its right, with its fields placed
again when the source's were autoplaced, and its page the lowest number no sheet uses,
stored at the parent's path where KiCad reads it. The copied file's symbols get references
of their own, so the two sheets are two sets of parts: each prefix takes its first free
number across the hierarchy, in the order of the symbols' x then y position, and the
units of one part keep one reference. A reference with no number stays as it is.
A source file that holds sheets of its own is refused, with nothing written, because its
sub-sheets would need new instance paths in other files. Give project_path when the
parent is itself a sub-sheet, so its place in the hierarchy can be found.
Args:
sheet_uuid: UUID of the sheet to duplicate
new_sheet_name: Display name for the new sheet
schematic_path: Path to parent .kicad_sch. Optional; omit to use the configured default.
project_path: Path to .kicad_pro (for hierarchy metadata)
new_file_name: Name for the copied file (auto-generated if empty)
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| sheet_uuid | Yes | ||
| project_path | No | ||
| new_file_name | No | ||
| new_sheet_name | Yes | ||
| schematic_path | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |